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.

Is it possible to set a custom name to one input field?

  1. I writing plugin that allows using of "special codes".
    On Gravity Form I want to allow people to define an input field named 'special_code' and then access it's value via validation filter from my code.
    GF insists on "input_5" - type of names. Which means on some forms it will be "input_2", on others "input_8". Some people will name it on forms as "Code Specialle", and others as "Preferred code".
    Then how do I find my "special code" field on submitted form to validate?
    I couldn't find a way to set an input name for a field?

    Gleb

    Posted 11 years ago on Sunday September 4, 2011 | Permalink
  2. Hi Gleb,

    I'd recommend having them set this as a CSS class. Then you can loop through each class looking for the "special" class. The field label can read whatever the user would like.

    Here is just a bit of sample code:

    http://pastie.org/2499353

    Posted 11 years ago on Wednesday September 7, 2011 | Permalink

This topic has been resolved and has been closed to new replies.