Native element fields that are mandatory
and required
but are not requirable
should show the required indicator *
#17442
Unanswered
leevigraham
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
@brandonkelly
I'm creating a custom
Element
with native fields.The native field is must be added to the
FieldLayout
(mandatory
) and requires a value (required
).Setting
requirable
to false ensures the user cannot disable therequired
option.However this also hides the
*
required indicator:Which is due to these lines:
Setting the
requireable
value totrue
shows the indicator but allows the user to change therequired
property and make the field optional:I've worked around this in some of my fields by overriding the selection indicators
I'm wondering if there's a better way to support this use case or is my override the only way.
Sidenote…
It would be good if the
$indicators
array had a key so it was easier to add / remove an indicatorBeta Was this translation helpful? Give feedback.
All reactions