PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Editing Name Attributes

  1. Batfan
    Member

    Is it possible to edit the 'name' attribute of hidden fields? If so, how?

    Posted 13 years ago on Monday January 10, 2011 | Permalink
  2. 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.

    Posted 13 years ago on Monday January 10, 2011 | Permalink
  3. Batfan
    Member

    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).

    Posted 13 years ago on Monday January 10, 2011 | Permalink
  4. Batfan
    Member

    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.

    Posted 13 years ago on Monday January 10, 2011 | Permalink
  5. 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.

    Posted 13 years ago on Monday January 10, 2011 | Permalink
  6. Batfan
    Member

    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

    Posted 13 years ago on Monday January 10, 2011 | Permalink
  7. 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.

    Posted 13 years ago on Monday January 10, 2011 | Permalink
  8. twwordpress
    Member

    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 ;)

    Posted 11 years ago on Saturday March 30, 2013 | Permalink
  9. Do you need assistance with something at this point or were you just sharing your experience?

    Posted 11 years ago on Sunday March 31, 2013 | Permalink