WordPress.org

Ready to get started?Download WordPress

Forums

User Submitted Posts
[resolved] Form data not retained post error/refresh (6 posts)

  1. absNzyg
    Member
    Posted 5 months ago #

    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/

  2. Jeff Starr
    Member
    Plugin Author

    Posted 5 months ago #

    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.

  3. absNzyg
    Member
    Posted 5 months ago #

    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?

  4. Jeff Starr
    Member
    Plugin Author

    Posted 5 months ago #

    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.

  5. absNzyg
    Member
    Posted 5 months ago #

    Got it!

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

    Thanks for all your help.

  6. Jeff Starr
    Member
    Plugin Author

    Posted 5 months ago #

    Awesome, glad you got it! :)

Reply

You must log in to post.

About this Plugin

About this Topic