New Feature: Allows custom group for showon#18937
Conversation
|
I have tested this item ✅ successfully on 66dcdb2 By the way you could use
Instead of the more confusing version you have. It basically allows blank or 1 values to match This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18937. |
|
Now the show on group is improved overall. |
libraries/src/Form/FormHelper.php
Outdated
| } | ||
| else | ||
| { | ||
| $showOnParts = explode('.', $showOnPartBlocks[0]); |
There was a problem hiding this comment.
You are setting $showOnParts but this is an array your are running through at line 472 so this is not a good idea.
You should use a different variable name here
There was a problem hiding this comment.
Thanks for your review. This is my fault.
|
I have tested this item ✅ successfully on 5a5eb72 Test as decribed in first Comment. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18937. |
|
@GeraintEdwards can you please retest? |
|
@franz-wohlkoenig If there is not any problem I think it should be RTC. |
|
@mvanvu i can't decide as there is only one successfully Test, Release Lead can. So best is to get a second Test. |
|
I have not tested this item. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18937. |
|
Changed PR title to New Feature |
|
What is missing here for me is that this showon should also consider the global value. I have Global (Show) but the Alias is not shown. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18937. |
|
@coolcat-creations as suggested from @GeraintEdwards just like this |
|
I have tested this item ✅ successfully on 5a5eb72 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18937. |
|
Right, sorry - was not obvious to me that it reffered to global :) |
|
Ready to Commit after two successful tests. |
Pull Request for Issue # .
Summary of Changes
By default the showon feature detects the group from base fields. This PR comes to build for developer can specify the field which from the other group.
Testing Instructions
Eg. I want to show the article title when the value of field jform[attribs][show_title] is show.
Before PR: no way to do (maybe, not sure)
After PR: Article title only show when the show title options is show.
Change the file /administrator/components/com_content/models/forms/article.xml line 21
From
To
The key changing here is showon="attribs.show_title:1".
The custom group should only apply for the first time, for Eg: we need to expand the condition to show_title is empty OR show_title = 1.
`showon="attribs.show_title:[OR]show_title:1"


`