You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello everyone,
I've been trying for hours to find out how I can change the name of a field within a form.
In a regular form, the name is rendered in a data[] array. But I can't use that because I want to make a POST request to a newsletter software that explicitly searches for certain names in the form for further processing.
I have already found a solution for a hidden field by copying the template and then using
{% if field.naked %}
{% set field_name = field.name |fieldName %}
{% else %}
{% set field_name = (scope ~ field.name)|fieldName %}
{% endif %}
have built in. This also works as I need it to. However, I can't figure out how and where to realise this with other fields such as text or email.
Is there a way that the names can be defined in an input field?
Translated with DeepL.com (free version)
The text was updated successfully, but these errors were encountered:
Hello everyone,
I've been trying for hours to find out how I can change the name of a field within a form.
In a regular form, the name is rendered in a data[] array. But I can't use that because I want to make a POST request to a newsletter software that explicitly searches for certain names in the form for further processing.
I have already found a solution for a hidden field by copying the template and then using
{% if field.naked %}
{% set field_name = field.name |fieldName %}
{% else %}
{% set field_name = (scope ~ field.name)|fieldName %}
{% endif %}
have built in. This also works as I need it to. However, I can't figure out how and where to realise this with other fields such as text or email.
Is there a way that the names can be defined in an input field?
Translated with DeepL.com (free version)
The text was updated successfully, but these errors were encountered: