We have encountered a bug in the form edit when adding additional prefixes to a Name field.
When editing a form:
- Add a name field
- In browser console, run “form”
- Observe the field in form.fields > choices is an empty string
- Enable “prefix” on the name field, and check the form in console again
- Observe the field in form.fields > {name field} > choices is still an empty string
- Go Advanced > Add a new custom prefix, and check form in console again
- Observe the field in form.fields > {name field} > choices is now an array with 1 object in it.
- Add another prefix, and check form in console again
- Observe the field in form.fields > {name field} > choices now has 2 objects in it.
- Remove the added prefix, and check form in console again
- Observe the field in form.fields > {name field} > choices still as 2 objects in it.
If the field is “conditional”, with more than 1 additional prefix, and is hidden on load, it is rendered on the front-end with the default value of choice_{form_id}_{field_id}_{field_sub_id}
, as GravityForms is seeing the Choices value.
E.G, a name field with Prefix,First,Last
1 additional prefix is fine
2 additional prefix sets the First to default value choice_1_1_2
3 additional prefix sets the First to choice_1_1_2
, and Last to choice_1_1_3