Implement a requiredon
attribute to (core) fields similar to the showon
attribute to enable conditional requiredness of form fields.
Some argue that having to toggle the requiredness of a field is a design flaw in the form, however I believe that it is not. For example a form to specify OAuth2 settings could have a dropdown to indicate the grant type. Depending on the grant type chosen, the form can change quite drastically. Some fields are not relevant for certain grant types and can be hidden, others are no longer required. The problem with only showon
is that you can hide these fields, but a hidden field still remain required.
Implement an attribute to the field specification named requireon
that accepts conditional statements identical to that of the showon
attribute. However the effect is to toggle the required attribute (and the little star next to the label)
I've got a working implementation for Joomla 4.x. in a simple zipfile which could be applied to an installed (and configured) Joomla installation for testing. since it overwrites some of the original Joomla files I see no way to implement this as a plugin or other form of installable...
Labels |
Removed:
?
|
Labels |
Added:
No Code Attached Yet
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-05-14 15:28:30 |
Closed_By | ⇒ | stephan-ansems |
I'll create a pull request...