Hi.
In a xml form, i need to make a show on in a field wich is in a fields group, but the showon depend of a external field (wich is in the parent, not in a <fields... tag.
For exemple :
<field name="something" type="radio" .... </field>
<fields name="params"... >
<field ... showon="something:1" ...>
</field>
</fields>
If the html there are
<div class="control-group" data-showon="[{"field":"jform[params][something]","values":"1"],"sign":"=","op":""}]" data-showon-initialised="">
instead of
<div class="control-group" data-showon="[{"field":"jform[something]","values":"1"],"sign":"=","op":""}]" data-showon-initialised="">
I suggest to prefix the field name with the fields group for exemple :
showon="params.fieldingroup..." if the field named fieldingroup is in a fields group named params
and let
showon="something:...." if the field named something is not in a fields tag.
Regards
Labels |
Added:
No Code Attached Yet
|
Labels |
Added:
Feature
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2024-05-08 18:20:24 |
Closed_By | ⇒ | rdeutz |
This issue was discussed at todays maintainers meeting. We agree that the showon feature needs improvment. But there are some design problems. ShowOn hides fileds only, you can run into problem if a field is required and can be hided with showon. Extending make this more complicated and it will lead to more errors as we face now. We need to rethink this feature to make it better and error prove. This should be the first step and then we can look into. extending.
We will keep that in mind, but for now I am closing this.