Redisplaying an empty form after submission

adop 01 Jun, 2012
Hi Bob,

I would like to set up a form which after submission is displayed again with all fields cleaned and is ready to be processed again.
If I use a loop event the form is redisplayed but it contains all the data already submitted. I could clear all the fields but than I should also clear $form->data for other pieces of information like creation date.
Is there a faster and simpler way to repropose the same, empty form?

Thanks,
adop
GreyHead 01 Jun, 2012
Hi adop,

The Show Form action will re-show the form. You may still need to clear the form data (the Show HTML action will usually try to republish it). If you need it put this code in a Custom Code action before the Show Form action
<?php
$form->data = array();
?>

Bob
adop 01 Jun, 2012
The code works well.

Thanks Bob.
adop
This topic is locked and no more replies can be posted.