• Resolved onedigitalfarm

    (@onedigitalfarm)


    Hi. I need to clear the cookies of the pages of the multi form every time one page is loaded. Can you please tell me how this can be achieved? Thank you

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

    (@webheadllc)

    Hi,

    If you delete the cookies on a page with the multistep form you’ll loose all data from the previous form. If that is what you want then you shouldn’t use this plugin.

    In any case these are the names of the cookies this plugin uses. You can use PHP or Javascript to clear these cookies:

    cf7msm-step
    cf7msm_posted_data
    cf7msm_prev_urls
    cf7msm-first-step

    Thread Starter onedigitalfarm

    (@onedigitalfarm)

    Thank you for your reply and for the warning. I need to clear the cookies when the first page is loaded and when the form is submitted.

    Thread Starter onedigitalfarm

    (@onedigitalfarm)

    I tried using setCookie(‘cf7msm_posted_data’, ‘value’, 0); when the first page is loaded but I still get the attached script added the page. Do you have a better suggestion on how to clear all the values in var cf7msm_posted_data?
    I really appreciate your help.

    <script type='text/javascript' id='cf7msm-js-extra'>
    /* <![CDATA[ */
    var cf7msm_posted_data = {"your-choice-1":"rollover","your-choice-2":"stay","your-choice-3":"sleep","your-choice-4":"","your-choice-5":"","cf7msm-no-ss":"","cf7msm_options":"{\"skip_save\":1,\"next_url\":\"https:\/\/coaching.behavioralinvestinginstitute.com\/new-decision-matrix-3\/\"}","page1":"","new-factor-1":"cost","new-factor-2":"distance","new-factor-3":"","new-factor-4":"","new-factor-5":"","new-factor-6":"","new-factor-7":"","new-factor-8":"","new-factor-9":"","new-factor-10":"","page2":"","new-rangeslider-factor1":"21","new-rangeslider-factor2":"61","new-rangeslider-factor3":"1","new-rangeslider-factor4":"1","new-rangeslider-factor5":"1","new-rangeslider-factor6":"1","new-rangeslider-factor7":"1","new-rangeslider-factor8":"1","new-rangeslider-factor9":"1","new-rangeslider-factor10":"1","page3":"","rangeslider-factor1":"","checkbox-1":["stay"],"checkbox-2":["stay"],"checkbox-3":[""],"checkbox-4":[""],"checkbox-5":[""],"checkbox-6":[""],"checkbox-7":[""],"checkbox-8":[""],"checkbox-9":[""],"checkbox-10":[""],"page4":""};
    var cf7msm_redirect_urls = {"512":"https:\/\/coaching.behavioralinvestinginstitute.com\/new-decision-matrix-2\/"};
    /* ]]> */
    </script>
    Thread Starter onedigitalfarm

    (@onedigitalfarm)

    I think I got it to work. Thank you for pointing me in the right direction.

    shaileshvishwakarma97

    (@shaileshvishwakarma97)

    @onedigitalfarm

    Can you please post here your solution?
    It will be helpful.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Emptying fields on page load’ is closed to new replies.