Streaming live at 10am (PST)

Auto-fill form values based on URL querystring


#24

So I need to match the field ID with these 4 parameters?


#25

Negative. No changes to the code. What it does is for each parameter (key=value pair) in the url, it looks for a field with the same id as the key, and if found, inserts the value into the field.


#26

Ahh, in that case - I need to match the ID for both email fields on both pages for it to work?


#27

It works! Thank you so much @samliew working now.

Thank you, feels like magic.


#28

Hi @samliew

I’ve been having problems with this in that the auto-generate email on querystring is very inconsistent, sometimes it works and sometimes it doesn’t.

I don’t know what might be causing this.

Would you be able to take a look if you have a free 2 minutes?

You’ll see that during incognito session, repeated email entries on homepage sometimes the email will pull through, sometimes it wont.

:confused:


#29

Seems like you have multiple fields named trial. Currently the code only works for unique fields.


#30

@samliew I see what you mean.

Is there any way to make it dynamic so we can link multiple email fields with one field-ID on the destination page?

Thanks


#31

Found a way around it. Thanks @samliew


#32

Hi! How did you manage to make it work with several forms? Can you share your solution?


#33

Hi! Why do you use “$(document).ajaxStop(function() {” to run the script ?

I used your script and your script runs immediately after the page is loaded, and not after the form is submitted.

Thanks!