• Resolved ajaxthemestudios

    (@ajaxthemestudios)


    Hello,

    We would like to be be able to define the value of the name attribute for hidden fields. Is this possible please? If yes, how can we do this?

    For example, we would like to be able to specific the name for the name attribute in the input field below like we did for the value attribute. Specifically we would like the name and value attributes’ values to be the same, So instead of “hidden-1” we will have “utm_source”:

    <div class="forminator-row forminator-hidden"><input type="hidden" id="hidden-1_64897b88c8667" name="hidden-1" value="utm_source"></div>

    We want to do this for multiple hidden fields in the same form.

    Thank you

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hi @ajaxthemestudios

    I hope you’re well today!

    You can set the label for the field in field settings (so this would be visible in submissions and/or e-mail notification) but the field “name” cannot be changed, I’m afraid.

    The name is also widely used as field “ID” internally and must stay as it is generated by the plugin.

    Kind regards,
    Adam

    Thread Starter ajaxthemestudios

    (@ajaxthemestudios)

    Okay. Thank you. Wish this is possible. Our developer use the field name attribute value in our other forms to pass utm parameters’ values into our forms responses.

    Is there a way we can do this with forminator? We absolutely love to use forminator and we have already put in a lot of effort into setting it up on our website but being able to use the utm parameters on our form is key to our business.

    Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hi @ajaxthemestudios

    Thanks for response!

    You mean you want the form to actually pick up the utm parameter value from URL and include it in the form in the hidden field?

    It is doable already:

    – edit the hidden field on the form
    – and from its “Default value (optional)” drop-down list select “Query Parameter” option
    – then in the “Query parameter” field below it put “utm_source”

    Apply changes and update the form and when you visit page with the form like this

    yoursite.com/formpage/?utm_source=123something

    the value of hidden field will automatically become 123something

    You can also change the label of hidden field to e.g. “UTM Source” so you would then clearly see it in your submission.

    —-

    If your form redirects somewhere after submission and you want to maintain that utm source in the redirect URL from the form, you can do that so. Edit form’s behavior and modify the redirect URL already set there by adding

    ?utm_source={hidden-1}

    at the end of it.

    Note:
    – if there are already some URL parameters added, use & characters instead of ?
    – and make sure to use correct hidden field ID

    Best regards,
    Adam

    Thread Starter ajaxthemestudios

    (@ajaxthemestudios)

    Thank you so much. This resolved the issue.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Custom field name attribute’ is closed to new replies.