Skip to main content

Hello,


How to modify the name of a field name, by adding a character that is not allowed by Unbounce? I absolutely need to use a dash “-” in the name of my parameter to pre-fill a form (on another page), like “zip-code” (to use as URL parameter)



I haven’t found any solutions that work.


I tried this but didn’t work (or something is missing…):




$('#zipcode').attr('name', 'zip-code');


Source here: Dash in Field Label being removed


(it’s for a radio field, if it changes something)


Thanks! 🙂

Hi @jenn welcome to the Unbounce Community!


So, is the solution in that thread you sourced not working?



Still… i’m also getting the same error?


Hi @Kyle.C


Thanks! 🙂


Nope, this solution didn’t work in my case. In the meantime, I have done differently. But I couldn’t find a solution that works to change the name of the parameter in the URL.


Found the issue, some typographical errors in the script. The one I have included below works 🙂


<script>
$('#returl').attr('name', 'retURL');
$('#zipcode').attr('name', 'zip-code');
</script>

Enjoy and happy unbouncing!


Reply