Skip to content

[Bug]: managed form field set to a wrong control using the API can't be updated #3559

Description

@mrudatsprint

What happened?

The Form Field API POST/api/form/field can set the control wrong for a managed field and not be able to fix it without deleting the field and re-creating.

For example, if the payload to create a custom field using the user.birthDate key was:

{
  "field": {
    "name": "Birthday",
    "key": "user.birthDate",
    "control": "radio",
    "type": "string",
    "confirm": false,
    "required": false
  }
}

Using this field in a self-registration form would not display a control correctly where the Birthdate can be entered. The control should have been text not radio.

Solutions:

  • When using the API, validate the control if a managed key is being used as is done when creating a managed key in the Admin UI.
  • Allow the PUT/PATCH to update the control to a corrected value.

Version

1.68.0

Affects Versions

No response

Alternatives / Workarounds

Delete the form field using the managed key and re-create.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions