Name Field Prefix Management Creates Persistent Choices Array & Causes Default Value Issues

We have encountered a bug in the form edit when adding additional prefixes to a Name field.

When editing a form:

  1. Add a name field
  2. In browser console, run “form”
  3. Observe the field in form.fields > choices is an empty string
  4. Enable “prefix” on the name field, and check the form in console again
  5. Observe the field in form.fields > {name field} > choices is still an empty string
  6. Go Advanced > Add a new custom prefix, and check form in console again
  7. Observe the field in form.fields > {name field} > choices is now an array with 1 object in it.
  8. Add another prefix, and check form in console again
  9. Observe the field in form.fields > {name field} > choices now has 2 objects in it.
  10. Remove the added prefix, and check form in console again
  11. 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