• Resolved ViR

    (@vitorams)


    Hi, before version 5 it was possible to add this to the confirmation message to save the fields. In this way they could be easily taken up when browsing the site. It’s a function that clickfunnels, and all forms have. It is needed because if a user returns to the site he does not have to re-enter the data from scratch. Now the scripts in the confirmation message no longer work but are shown as text and not as code.

    How can I save fields as cookies?

    Here is the code that worked until a few weeks ago:
    <script>
    document.cookie = "form-field-name={inputs.name}";
    document.cookie = "form-field-email={inputs.email}";
    document.cookie = "form-field-phone={inputs.phone}";
    </script>

    • This topic was modified 1 year, 5 months ago by ViR.
    • This topic was modified 1 year, 5 months ago by ViR.
Viewing 1 replies (of 1 total)
  • Plugin Support Tahmid ul Karim

    (@tahmidulkarim)

    Hi @vitorams,

    We had to add validation in the Forms confirmation message to adhere to the security best practises and thus if you add any scripts directly in the confirmation message then it won’t work anymore.

    As an alternative, you can implement the function using custom JS codes. Here is an example code snippet based on your use case –

    jQuery(document).on('fluentform_submission_success', function() {
    
       let email = 'email';
       let value  = jQuery("input[name='"+email+"']").val();
     
       document.cookie = "form-field-email="+value;
       
    });

    You can add this code in the custom JS section of your Form.

    Thank you!

Viewing 1 replies (of 1 total)
  • The topic ‘Save cookies in form submission’ is closed to new replies.