Hi there
I was wondering, if there were an option to write a tiny jquery script to convert the values of true respectively false of a checkbox into yes respectively no when Webflow submit the forms ?
Thank you for any tips !
Anthony
Hi there
I was wondering, if there were an option to write a tiny jquery script to convert the values of true respectively false of a checkbox into yes respectively no when Webflow submit the forms ?
Thank you for any tips !
Anthony
Did you find an answer ?
Seems a bit dicey…
I don’t know of any way to specify those values in in the HTML element itself, which means that the web browser itself is generating true
| false
on the form submission. If you’re using Webflow’s in-built form submit, I believe that’s AJAX-based (?) which means changing those values might have further undesirable consequences in webflow’s handling of your form data.
Instead, consider these cleaner approaches-
If you’re set on using a checkbox, but need an on
or off
value in your data, here’s a different approach that could work for you…
on
| off
value to appear as.on
| off
value you want on your hidden element.Voila, you have have a checkbox control, with a custom value in your form data.
Note that when the form is submitted, you’ll get both values, e.g…
myvalue=on
chk_myvalue=true