WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Form data not retained post error/refresh

[Resolved] Form data not retained post error/refresh

  • Hi,

    Thanks for the plugin. I have found that in case of a submission error the data of the content field is not retained and a blank form is loaded. Is there any way to ensure that the data fields still remain populated even if the page refreshed to display the error so that the user does not have to type everything all over again?

    Thanks!

    https://wordpress.org/plugins/user-submitted-posts/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Jeff Starr

    @specialk

    Older versions of the plugin included SESSION-based remembering of form values, but it was causing some issues so had to be removed. Now, the plugin includes JavaScript that prevents the form from being submitted if the required fields aren’t filled out. Check the option to “Include JavaScript” is enabled to see it work.

    That makes sense. And with “Include Javascript” it’s retaining the data. Thanks for the speedy response.

    One more query though. Earlier, tag field was optional and I want to keep it that way. Now the all the fields are required. I have tried to change the “data-required” value to false in submission-form.php, still no go. Any idea?

    Plugin Author Jeff Starr

    @specialk

    The JS validation is done with Parsely:

    http://parsleyjs.org/

    Have a look at the documentation, there should be a way to change the script to require or not require specific fields.

    Got it!

    Removed the data-required=”true” tag, and the usp-required class.

    Thanks for all your help.

    Plugin Author Jeff Starr

    @specialk

    Awesome, glad you got it! 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] Form data not retained post error/refresh’ is closed to new replies.