Stop CF7 from clearing fields after submit.
-
This has been a widely discussed topic but NO real solution. Like most people asking this question, I am trying to save the user from filling details on the form multiple times if he/she would like to download more than one file.
Can you please tell me how to stop the form from clearing out?
I have tried to do as described in a resolved post: https://www.ads-software.com/support/topic/keeping-fields-from-refreshing-on-submit?replies=8
However, in CF7 4.3.1, in scripts.js, I do not see:
if (1 == data.mailSent) {
$(data.into).find(‘form’).resetForm().clearForm();
ro.addClass(‘wpcf7-mail-sent-ok’);I only see:
if (1 == data.mailSent) {
$responseOutput.addClass(‘wpcf7-mail-sent-ok’);
$form.addClass(‘sent’);if (data.onSentOk) {
$.each(data.onSentOk, function(i, n) { eval(n) });
}$(data.into).trigger(‘wpcf7:mailsent’);
if (1 == data.mailSent) {
$form.resetForm();
}Now which part is causing the form to clear fields after submit? I would imagine its the resetForm() but I tried commenting out and it still clears the form
- The topic ‘Stop CF7 from clearing fields after submit.’ is closed to new replies.