Pre-fill radio buttons


#1

I am trying to pre-fill a radio button of a form like this:

http://fake.domain.fake?&your_chosen_class_Monday2=Monday2&inf_field_FirstName=test

but only the First Name gets pre-filled.

A jQuery maybe?

Please help.

Thanks


#2

Hi Elysium, 

Based on your question, my team and I, wrote a quick script to help you and other Unbouncers pre-fill radio and/or checkbox fields. 

You can find detailed instructions and the script right here

Let me know how it works out.

Best,
Hristian


#3

hi Hristian

i just checked the script but the page is not there.

i am also interested in a “native” Unbounce script that retrieves URL parameters in general so that a custom JS can access the value of the parameter without additional scripts.

http://fake.domain.fake?parameter=824083

thanks


#4

Hi @Elysium_Nguyen

The page is still there. Just the formatting got a little bit messed up when Unbounce switched platforms for the community.

Here is a direct link to the script: https://gist.github.com/hristiank/fb163059f788da206d33ef43b80720ea

Here is a direct link to the example page: http://unbouncepages.com/radio_buttons_test/?testing_the_radio_buttons=Two&testing_check_boxes_i=Three&testing_check_boxes_ii=One&testing_check_boxes_ii=Three

As far as the “native” Unbounce script you’ve mentioned… I’m not really sure what you are asking about?
All Unbounce scripts are JS scripts. Therefore, you’ll need to adjust the JS script you do have to access whatever you want.

Best,
Hristian