Post form data on page load


#1

I want to use my unbounce page to capture form data from URL paramters and submit it when the page loads and without any user interaction.

I have javascript that parses my URL parameters and populates the form fields, but when I call submit() the data is submitted and I can see it in my “leads”, but I get a response of "{“protected_assets”:{}} that appears on the screen.

Is there any way to do this?


#2

Hi Kevin, did you get any solution here?


#3

Hey there Pedro!

I’m going to send you a personal email on this question - keeps your eye open for it :slight_smile:


#4

Hey there!

You should be able to capture form data from URL parameters and submit the form when the page loads without any user interaction, with some custom Javascript. However I do not have an example script of how this would work.

The ‘{“protected_assets”:{}}’ message Kevin was seeing should not be related to submitting the form without user interaction but we have seen this message when using Cloudflare with the domain or other custom scripts.

If you have any questions feel free to send us an email at support@unbounce.com.