Replies: 2 comments 1 reply
-
You can define a default value for this field, which is used if the field is not visible on the screen. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37454. |
Beta Was this translation helpful? Give feedback.
-
As of right now, shownon is only used to UI to show/hide fields depends on certain conditions. We do not use it for validating submit form data. Through the years, I have seen several reports like this but we never work on it further. For the time being, I guess you will have to use default value as suggested by @chmst as a workaround. I'm converting this to discussion to see if we want to work further on it. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Steps to reproduce the issue
Create an xml field and set the shownon attribute to whatever is the value of another field then set the attribute to "required=true". You'll get an error while saving that it cannot be saved because a required data is missing or something like that.
Expected result
Shouldn't it check for "shownon"? If set and not enabled, bypass the field required validation and if enabled then it validate for required value?
Actual result
The validation of required field does not check the field showon attribute value.
Additional comments
I don't know if this is a bug, but looking at it as in an end user perspective it is a bug. First thing that comes to my minds is "That field is not enabled, why do I have to enter a value?" .
Beta Was this translation helpful? Give feedback.
All reactions