• Resolved santokki

    (@santokki)


    Perhaps stupid question, but how to change the “name” parameter of an input field?

    When Ninjaforms makes a form input, it creates the name something like “ninja_forms_field_21″… for example:

    <input id=”ninja_forms_field_21″ name=”ninja_forms_field_21″ type=”hidden” class=”ninja-forms-field ” value=”” rel=”21″ />

    I have some scripts that depend on the name of certain form inputs being a custom value. So I need to change it to something like:

    <input id=”ninja_forms_field_21″ name=”customName” type=”hidden” class=”ninja-forms-field ” value=”” rel=”21″ />

    How to do it? I thought it was Admin Label under Restrictions, but it doesn’t seem to do anything. Thanks!

    https://wordpress.org/plugins/ninja-forms/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter santokki

    (@santokki)

    Also, how to change the “id” to be a custom value as well. Thank you

    Hello! Thanks for using Ninja Forms!

    I would not recommend changing the ID of the fields because Ninja Forms needs to use the next subsequent number for the next field you would want to add to the form.

    What are you trying to achieve exactly with those scripts? Cannot you use custom classes?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘How to change the "name" parameter of an input field?’ is closed to new replies.