Capture cookies in a draft state form

By: Edvertica Developer | Asked: 05/26/2023
ForumsCategory: Code SnippetsCapture cookies in a draft state form
Edvertica DeveloperEdvertica Developer asked 11 months ago
Hi guys, I have set up a multi-step form on a website and will capture a cookie if there is any. A hidden field has been added to store cookies as shown below:   image.png   And to set the cookies, I have created a snippet as shown below: image.png   And then, the cookies will be sent to the hidden field by using the code snippet below: image.png   Everything is working fine at first but when I try on the form in draft state, the cookies are not applied to the hidden field. I am looking for a way to make the field get the latest cookie even if the form is in a draft state.
1 Answers
Victor Font answered 11 months ago
Why are you storing a cookie name as the value of a referring URL instead of just using the built in shortcode to save the referrer URL? https://formidableforms.com/knowledgebase/using-dynamic-default-values-in-fields/#kb-get-the-current-or-referring-url

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right