Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter droopyman

    (@droopyman)

    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”.

    Thread Starter droopyman

    (@droopyman)

    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){
    		$(selector).each(function(){
    			var name = $(this).attr('name');
    			if($.cookie(name)){ $(this).val($.cookie(name)); }
    			$(this).change(function(){$.cookie(name, $(this).val(), { path: '/', expires: 365 });});
    		});
    	}
    	remember('[name=user-submitted-name]');
    	remember('[name=user-submitted-url]');
    	remember('[name=user-submitted-title]');
    	remember('[name=user-submitted-tags]');
    	remember('[name=user-submitted-captcha]');
    	remember('[name=user-submitted-category]');
    	remember('[name=user-submitted-content]');
Viewing 2 replies - 1 through 2 (of 2 total)