Skip to content

Change to field names in 1-alpha #896

Closed
@donalmurtagh

Description

@donalmurtagh

I'm not sure when exactly this changed, but prior to upgrading to the latest alpha, I was generating field names like this in my templates:

<input type="radio" name="{{form.key.join('.')}}">

The latest templates seem to recommend using the following instead

<input type="radio" name="{{::fieldId(true, false)}}">

I changed my templates to use the new field names and in the case of one particular field inside an array, this changes the field name from

name=".0.peopleLivingWithYou.dependentChildren.0"

to

name="current_form--0-peopleLivingWithYou-dependentChildren-0"

I think this should be mentioned in the migration guide, because there may be other parts of the application that rely on the old names.

More importantly, I discovered that the old names don't work for fields inside arrays

@json-schema-form/angular-schema-form-lead

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions