Solved

Controlling How Form Data is Passed to URL

  • 7 December 2016
  • 2 replies
  • 25 views

I’m new to Unbounce and just trying to figure out how to best accomplish this.

My form within the Unbounce editor has a few fields and is set to pass the form data as GET variables to a URL.

Since GET variables are key=value pairs I can send the key over by naming it the way I want to on the receiving URL, but it’s the value I’m having trouble with.

The value I want to pass to my URL is not exactly identical to what is selected in the form.

For example, let’s say I have a form with a single radio button:
( ) I like hot dogs
( ) I don’t like hot dogs

Since my parameter name will be hotdog that will pass to the URL as the key. But I don’t want the value to be “I like hot dogs” (the space in the sentence might even present an encoding issue and be changed to %20).

Instead, I’d want the GET to look like ?hotdog=yes when the first option is selected.

I’ve been reading about hidden fields, but can’t understand if they’re relevant to this use case.

Thanks for your help!

icon

Best answer by Hristian 7 December 2016, 21:49

View original

2 replies

Userlevel 7
Badge +3

Hi @orvn,

You seem to be on the right path.

Instead of passing the original value (ex. I like hot dogs), you need a script and a hidden field.

The script will autofill the hidden field with a single value (ex. yes) and you would pass that on to your URL.

Best,
Hristian

That makes sense, thanks!

Reply