Is it possible to edit the 'name' attribute of hidden fields? If so, how?
Is it possible to edit the 'name' attribute of hidden fields? If so, how?
No, you cannot edit the name attribute or markup of the hidden fields. The form markup is dynamic so it's generated by the form rendering engine. It can't be changed.
What exactly are you trying to do? You can pre-populate hidden fields via API hooks and the query string. If you provide details on what you are trying to do we can let you know how it can be accomplished with the available API hooks, etc.
Sure. So, we have javascript that tracks email leads and it looks for a hidden field with a specific name attribute and then checks the value (which I have set the default for).
I should add that it does not necessarily have to be a 'hidden' field. As long as I have an input where I can edit the name and the default value, I can just hide it with CSS.
The name and id's attributes of fields cannot be customized or changed. They are dynamically generated. So unless your javascript can be tweaked to tell it the correct name, it won't be compatible. But it the Javascript has the name or id of the field in the script, I don't see why it couldn't be changed in the Javascript itself.
Unfortunately, thats not an option. It's a centrally located script thats used by thousands of our customers. Guess we won't be using Gravity Forms :)
Thanks
Sorry to hear that. You may want to consider making it flexible so it can be defined on the specific site. It's pretty typical for form builders to not allow you to edit this information. Some allow it, some don't.
I was disappointed when I read this thread, but I actually think you might be able to work around this!
In the Form Settings under Confirmation you can set the form to redirect. If I understand this correctly GF will submit, then hit this page. Select "Pass Field Data Via Query String", and use the merge tags.
Now, you can hit that page (and using a page template do whatever logic you like within it), with a query string like whatever.com/thanks?email=asd@asd.com - even if the email name attr had been input_3!
Bob == uncle.
I'm sure this advice came just in the nick of time ;)
Do you need assistance with something at this point or were you just sharing your experience?