While the custom fields do allow for default values to be defined, the oneOf type that renders a select list is lacking. It does not pre select the default option which is something that native HTML certainly supports.
The documentation doesn't outline a way to do this if it is already built in and has also been submitted to ARC answers forum.
Preselecting the option would cause for less confusion for the end user and in some cases, one less click for those users that would want to see what's selected by manually defining it. (Assuming they know what option to pick.)
Categories | Editor |
I need it... | Week |
Hi Joe,
Thanks for your submission. The ability for a user to define a preselected option for the oneOf custom fields type was released as part of PageBuilder Editor 2.3. We did take a look to see if defaultValues for oneOf is working as expected for The Globe, and didn’t see any issues with the experience.
To provide a default value you can use the .tag field. Within PageBuilder Editor, for custom fields with dropdown values, “---” will display by default instead of “None” to indicate a default value has not yet been selected. If a default value for the dropdown has already been set, that value should display in the custom field.
If a user would like to go back to not having a selection state, then they should select “---” from the dropdown. If you would like to update a block’s custom field values, please note that blocks using the previous default custom field will not retroactively update to the new default because defaults only apply when a feature is added to a page.
Please let us know if I can provide any further clarification or if there's a specific feature/block you're having issues with and we can try to assist with any troubleshooting.
Katherine