Auto Population on forms after submission

Hello,

I have a request to auto-populate some of the information on the form i.e. First Name, Last Name, Phone Number, etc... after a user has submitted and the next time they open a form.

For example, I open the form and submit. Next time, I open the form, some of the fields would be pre-populated based on the information I submitted earlier.

As this is a Public form, I was thinking of using cookies to store information after the user submits form. Could you please advise if this is a feasible approach, does cookies even work with Mobile Devices. what would you suggest?

Thanks,

Alberto

Also, is it possible to make the form stop clearing information after Submitting?

Hello @adasilva,

You can use cookies to populate fields with previously entered values. You can find an example of how to set and get cookie values here.

And you can prevent a from form clearing values ​​after submission using this code in the Submit button:

var tmp = fd.data();
return fd.save().then(function() { fd.data(tmp) });
1 Like

Hi Margarita,

I have created cookies as per the article above but we have noticed the following issue with mobile Safari on iOS. We created the cookie and set its expiry date for 7 days. We noticed that on Android devices and laptops it works fine, but in Safari/iOS the cookies expire after 24 hours when using mobile Safari. We noticed this behavior happening in some iPhones while others do not do this.

Do you have any idea what could be causing this and what we can do to stop it. This seems to be caused by mobile Safari, the funny thing is that for some iPhones this happens but while other ones do not.

I have attached my code for your reference.

JavaScriptCode.txt (24.1 KB)

Hello @adasilva,

Probably Cookies are disabled on those devices. Please make sure that 'Block All Cookies' setting is disabled.

image