### Is your enhancement related to a problem? Please describe. When filling out a form, if a user does not pass a validation check then the entire form will be lost. This is with JavaScript support enabled. https://github.com/user-attachments/assets/efc9a92b-4cac-41f1-b183-7dd90dc9a80c ### Designs #### Non JavaScript solution - will work with or without JS We can repopulate the `<input>` fields on failed submission with the submitted value from the `$_POST` variable in the [mailchimp_form_field](https://github.com/mailchimp/wordpress/blob/0b93ec334a1583378fb2daa393b60a1614c20cf0/mailchimp_widget.php#L390) function. #### JavaScript is enabled (optional) - Option 1: We can store the in progress form data in local storage - Option 2: We can validate form submissions on the FE to avoid clearing form data when it hits the BE ### Describe alternatives you've considered Considering that a user could become frustrated and leave without re-attempting form submission I think this is worth fixing. ### Code of Conduct - [X] I agree to follow this project's Code of Conduct
Is your enhancement related to a problem? Please describe.
When filling out a form, if a user does not pass a validation check then the entire form will be lost. This is with JavaScript support enabled.
form-data-lost-on-validation-fail.mov
Designs
Non JavaScript solution - will work with or without JS
We can repopulate the
<input>fields on failed submission with the submitted value from the$_POSTvariable in the mailchimp_form_field function.JavaScript is enabled (optional)
Describe alternatives you've considered
Considering that a user could become frustrated and leave without re-attempting form submission I think this is worth fixing.
Code of Conduct