- Issue created by @aitala
- πΊπΈUnited States john.oltman
Hi Eric, the default is controlled by editing the "Default state" field on the Registration Type. To control which states are shown on the registration form, edit the workflow states (/admin/config/workflow/workflows/manage/registration) and check the "Show on Form" field for those states you want to appear in the select box. In many cases regular end users should not be able to pick a state - you control who sees the State field via permissions. If not need more control than this, you will need to do a hook_form_alter in a custom module and do your logic via PHP code.
John
- πΊπΈUnited States aitala
HI,
Yes, I'm getting that on the node display page to do a registration but I'm trying to create the node in one of two possible initial states, "In Stock" or "On Order". If the default state is "In Stock" I have the workflow set so the editor can change it after creating the node to "On Order" but I'm pretty sure they will find this confusing.
The end user won't be be able to register nodes "On Order" only "In Stock" - basically this is being used as a placeholder for items that have been requested for a specific user which might never be added. Once they do come in, they'd be moved into an "Ordered" state by the editor for that specific user, skipping "In Stock" altogether.
Thanks,
Eric - πΊπΈUnited States john.oltman
Interesting - almost seems like the node needs workflow of its own. You might consider the Content Moderation module which provides different states for nodes. There is also Drupal Commerce which uses products instead of nodes, and has a Commerce Stock module as a contrib.
- Status changed to Closed: works as designed
over 1 year ago 7:24pm 4 April 2023