Home>Support>Post reply not clearing all fields

Post reply not clearing all fields

By Simo, 7 years ago. Last reply by Simo, 7 years ago.

Hi

I am using the vantage theme :):)

When a person submits a reply to a comment and it is posted e.g. the screen is refreshed, the comment field is cleared of data but data still exists in the other fields i.e. email?

Is there a setting I have not set or code required to clear these fields?

Many thanks for all your support.

Simos

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 7 years, 6 months ago Alex S
    Hi, I Work Here

    Hi Simo,

    This is how WordPress handles the comment form in general. To prevent this, you’ll need to disable this functionality in WordPress. Please install Code Snippets, then navigate to WP AdminSnippetsAdd New and add the following PHP:

    function so_comment_dont_set_cookies() {
    	remove_action('set_comment_cookies', 'wp_set_comment_cookies');
    }
    add_action( 'init', 'so_comment_dont_set_cookies' );
    

    Title the snippet something like, Don’t Store Guest Comment Data.
    Please note that this will prevent users from seeing their comment before it’s been approved if you’ve set up comment moderation.

  2. 7 years, 6 months ago Simo

    hi Alex

    many thanks for the feedback.

    I have created and activated snippet, set to run on front end only.

    I logged out and did test replies but all result in data being left in fields. In fact I input one name and email address, posted comment, left details visable so changed them and posted a new comment. When screen refreshed it displayed the original name and email address?

    Any idea what I’ve done wrong as I assume I do not have to call the function?

    As ever in your debt.

    Simos

  3. 7 years, 6 months ago Alex S
    Hi, I Work Here

    Hi Simo,

    To clarify, did you previously post comments via that browser? I ask as it’s possible older data was being picked up. This change will only affect new users.

    Also, I would recommend setting it to affect everything. I’m unsure if it’s relevant but it’s best to be safe.

  4. 7 years, 6 months ago Simo

    Hi Alex,

    Yes I am using the same browser. I did clear cashe, log out of WP and did leave the comment as someone not registered. You can try that if you wish :) http://chatnsurf.co.uk/live-a-little is the post where you can leave a comment without logging in and see what is happening.

    I will reset back to affect everything now so will take affect if you test.
    Cheers
    Simos

  5. 7 years, 6 months ago Simo

    Hi Alex,

    Hold on above :):)

    I uninstalled and redid everything and now it seems to work????

    I will let you know how it goes after further testing.

    As ever many thanks

    Simos

  6. 7 years, 6 months ago Simo

    Hi Alex,

    You may remember that I asked a question about using the NAVxt breadcrumb.

    https://wordpress.org/support/topic/cannot-change-blog-breadcrumb-settings/#post-8984880

    this is the link to the conversation I have been having with their support.

    I haven’t been able to resolve the issue; probably down to my understanding, but I thought I would let you know.

    In the thread you will see a link to the post that shows how I have had to use the plugin in now.

    Many thanks

    Kind Regards

    James |

    _____________________________________________

    Please don't print this e-mail unless absolutely necessary |

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More