Hello,
I'm looking for an option to reset form values after successful submission. Actually, using javascript is rather straight forward, but was wondering if there was a way with php alone. It seems there would be...
Basically, I've just learned about this key value :
if (!empty($form_state['executed'])) {
// I could therefore use this in my AJAX callback to reset my form
}
I thought I could use drupal_get_form, but learned otherwise.
I then found a similar issue with ctools 6.x #1025448: Add an AJAX form example to the CTools ajax sample module
It seems that I would have to (re)build the form with the equivalent native 7.x drupal_build_form, but there are obviously differences between the ctools 6.x ajax framework and the new native drupal ajax framework. I've tried a few variations of the above, but it's not working for me.
Any clue would be appreciated.
Cheers