Support » Plugin: User Submitted Posts » The form fields seem to remember entered values even after reloading page

  • Resolved droopyman


    Hey guys,

    I have been using this plugin for a long time, but after the latest update of the plugin it is giving me problems.

    The form fields seem to remember the entered values permanently, even after reloading the page. Only clearing the cookies and cache gets rid of the form values. Is there way to tell the form not to remember the enter values?

    Please help.

    Note: I have enabled Javascript option in my “User submitted post” options.

Viewing 4 replies - 1 through 4 (of 4 total)
  • I found this code inside user-submitted-posts/resources/usp.php. This code is making the form values to be remembered permanently even after reloading the form several times. Only clearing the borwser cache and cookies will make the form forget the values.

    What should I do to make the form form forget the values once the page is reloaded.

    // remember input values
    	function remember(selector){
    			var name = $(this).attr('name');
    			if($.cookie(name)){ $(this).val($.cookie(name)); }
    			$(this).change(function(){$.cookie(name, $(this).val(), { path: '/', expires: 365 });});
    Plugin Author Jeff Starr


    Disabling the JavaScript file is one way to go about it, then you can add any of the other snippets manually via your theme or whatever.

    Hi Jeff,

    I want to thank you so much for making this plugin. This plugin is very important and valuable to me.

    I fixed the problem by commenting out the “// remember input values” code I mentioned in my previous reply. The code can be found inside user-submitted-posts/resources/usp.php Now the form does not remember the entered values after reloading the page.

    But a bug I wish to report here is. If I disable javascript in the USP options, then there is a form validation bug that seems to arise. The “Post Content” field validation seems to have disappeared after the latest update.

    For example: The user leaves the “Post Content” field blank clicks submit, the form successfully submits. This results in a blog post that has a “Post title” but does not have “Post content”.

    Plugin Author Jeff Starr


    Glad to hear you got it, and thanks for the feedback — will definitely look into it for the next update.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘The form fields seem to remember entered values even after reloading page’ is closed to new replies.