Make use of States API optional

Created on 7 February 2025, about 2 months ago

Problem/Motivation

Currently the module assumes that you want to set the selected field as required *both* when loading an entity form where the entity is in the required state *and* when changing the workflow state on the form (client-side) before submitting the form.

The request here is to make the second part optional, so that we can choose to have the module *only* do the first thing: set the required state of the field when loading an entity form, if the entity is in one of the selected states.

Proposed resolution

Introduce a new per-field third-party config setting for "use states api" to allow this behaviour to be optional.

Remaining tasks

  • Extend config schema to include new "use states api" setting
  • Extend field config form/submit handler methods to allow administrator to configure this setting
  • Extend process form fields method to respect the setting and leave out the States API form elements if unset.

User interface changes

A new setting on the field config form labeled "Set field as required immediately upon selecting workflow state using Javascript."

Data model changes

New "use_states_api" boolean config in the per-field third-party settings schema.

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇨🇦Canada spiderman Halifax, NS

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024