Allow specifying Checkbox field "value" (different from label)


#1

Web forms currently only provide input entry for Checkbox labels, but not values.(The system uses the label for the value, which gets messy.) I’d like to separately specify value for cleaner data collection and reporting.

Example:
Checkbox Name: "optin"
Checkbox Choice:
LABEL: "Yes! I’d like to be notified of future promotions"
VALUE: “Y”


#2

This would be nice. I know it can be done with a custom script for drop-down boxes, but not sure about checkboxes. If it was a default feature, that would be great.

PS: Great to see you on the Unbounce forums, Angie. Fan of your work.


#3

Yeah. I could rig it manually with jQuery, but that would be tedious and susceptible to error if someone else on the account edited the page. It would be ideal if “text” and “value” were separate fields for dropdowns and checkboxes.

Glad to connect with you via the forum, Nicholas! =D


#4

This would be good for any/all non-text input fields like Select elements.


#5

Hi everyone, this has actually been brought ip a few times in the community in the past. While it’s not a built in feature at the moment, it is fairly easy to set up with a bit of javascript (just one line actually). Check out my response on another thread for an example of that javascript that you can use on your own pages. You’ll just need to swap out the ID for the field and he value.

@Angie_Schottmuller is right though it can get tedious pretty quickly depending on the number of checkbox options you’re using. Keep in mind as well that Unbounce will only ever send a string as the value so this won’t work if you need an integer or boolean data type. Unfortunately this is the best solution for the time being.

Hope this helps!