Forums

Empty custom form fields after submission

simondoap 30 Jul, 2015
Hi,

I am creating a custom form using cronoforms and chronoconnectivity for the registration of training sessions on a website. After a training has been registered, by submitting the form, and that i want to create a new training, the form comes up with the data of the previous registered training.
I want to be able to create a new training by getting an empty form.
thanks
GreyHead 30 Jul, 2015
Hi simondoap,

Please add a Custom Code action to the form On Load event, drag it up before the HTML (Render form) action and add this code to it
<?php
$form->data = array();
?>
That will reset the $form->data array. It might be too much in which case we'll need some slightly more complicated code to keep any needed values.

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