Pre-fill radio buttons

  • 24 March 2016
  • 4 replies
  • 20 views

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


4 replies

Userlevel 7
Badge +3

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

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

Userlevel 7
Badge +3

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

Thanks for building this script @Hristian - the example page no longer works, but I figured it out anyway.

I’m preparing an ebook campaign with 4 different free giveaways. Each giveaway has a CTA with a unique link that presets a value in the interest field on the landing page. Which again triggers a unique email flow. Let’s see how it works.

Reply