Closed (fixed)
Project:
Entity Registration
Version:
3.3.x-dev
Component:
Registration Core
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
12 Sep 2024 at 11:43 UTC
Updated:
20 Oct 2024 at 19:44 UTC
Jump to comment: Most recent
Comments
Comment #3
mandclu commentedComment #4
john.oltman commentedMakes sense, thanks @mandclu! One concern is existing installs that rely on having the State field displayed even if it can't be changed, especially when an existing registration is being edited by an admin (uses the same RegisterForm as a new registration). I also think when hiding the field on an existing registration, it should set the value using the value of the registration state and not the one state in the states array, otherwise the state could unwittingly change without the admin knowing.
To address existing installs, an idea is add a field to the Workflow settings at /admin/config/workflow/workflows/manage/registration, it would be labelled "Single State Form Handling" with help text "Indicate how the registration state field should be handled when only one state is configured to be shown on the registration form" and possible values "Hide the State field" and "Show the State field", with "hide" being the default. We would then have a hook_update_nn set the value to "show" for existing sites and workflows. This way existing installs experience no change, and new sites hide it - we can mention in the release notes so existing sites can edit the workflows if they want the new way of doing things.
We'll also eventually need some tests.
Would like your thoughts on my ideas above, setting to needs work while we work through this.
Comment #5
john.oltman commentedGoing to proceed per my previous comment since no push back.
Comment #6
john.oltman commentedBetter idea is to add the show/hide setting to the form field widget, so each form display can be configured differently as needed.
Comment #13
john.oltman commented