Feature No Code Attached Yet
avatar rolandalsace
rolandalsace
25 Mar 2024

Is your feature request related to a problem? Please describe.

Steps to reproduce the issue

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

Expected result

Actual result

System information (as much as possible)

Additional comments

Describe the solution you'd like

Additional context

avatar rolandalsace rolandalsace - open - 25 Mar 2024
avatar joomla-cms-bot joomla-cms-bot - change - 25 Mar 2024
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 25 Mar 2024
avatar rolandalsace rolandalsace - change - 25 Mar 2024
The description was changed
avatar rolandalsace rolandalsace - edited - 25 Mar 2024
avatar Hackwar Hackwar - change - 25 Mar 2024
Labels Added: Feature
avatar Hackwar Hackwar - labeled - 25 Mar 2024
avatar rdeutz rdeutz - change - 8 May 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-05-08 18:20:24
Closed_By rdeutz
avatar rdeutz rdeutz - close - 8 May 2024
avatar rdeutz
rdeutz - comment - 8 May 2024

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.

Add a Comment

Login with GitHub to post a comment