? ? Pending

User tests: Successful: Unsuccessful:

avatar mvanvu
mvanvu
1 Dec 2017

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

<field 
			name="title" 
			type="text" 
			label="JGLOBAL_TITLE"
			description="JFIELD_TITLE_DESC"
			class="input-xxlarge input-large-text"
			size="40"
			required="true" 
		/>

To

<field 
			name="title" 
			type="text" 
			label="JGLOBAL_TITLE"
			description="JFIELD_TITLE_DESC"
			class="input-xxlarge input-large-text"
			size="40"
			required="true" 
                        showon="attribs.show_title:1"
		/>

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"
screenshot from 2017-12-01 22-49-26
screenshot from 2017-12-01 22-49-56

`

avatar mvanvu mvanvu - open - 1 Dec 2017
avatar mvanvu mvanvu - change - 1 Dec 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 1 Dec 2017
Category Libraries
avatar GeraintEdwards GeraintEdwards - test_item - 3 Dec 2017 - Tested successfully
avatar GeraintEdwards
GeraintEdwards - comment - 3 Dec 2017

I have tested this item successfully on 66dcdb2

This works fine - a logical extension of showon. I have been grappling with an issue like this for subforms so the idea could be quite useful

By the way you could use

showon="attribs.show_title:1,"

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.

avatar mvanvu mvanvu - change - 5 Dec 2017
Labels Added: ?
avatar mvanvu
mvanvu - comment - 5 Dec 2017

Now the show on group is improved overall.
For eg: content title showon attribs.show_title:1[OR]images.float_intro:left

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 9 Dec 2017 - Tested successfully
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 9 Dec 2017

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.
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 9 Dec 2017

@GeraintEdwards can you please retest?

avatar mvanvu
mvanvu - comment - 26 Jan 2018

@franz-wohlkoenig If there is not any problem I think it should be RTC.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 26 Jan 2018

@mvanvu i can't decide as there is only one successfully Test, Release Lead can. So best is to get a second Test.

avatar grhcj
grhcj - comment - 26 Jan 2018

I have not tested this item.

Du you expect the title field to be bigger than the alias field?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18937.

avatar grhcj grhcj - test_item - 26 Jan 2018 - Not tested
avatar infograf768 infograf768 - change - 30 Jan 2018
Title
Allows custom group for showon
New Feature: Allows custom group for showon
avatar infograf768 infograf768 - edited - 30 Jan 2018
avatar infograf768
infograf768 - comment - 30 Jan 2018

Changed PR title to New Feature

avatar coolcat-creations
coolcat-creations - comment - 17 Jul 2018

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.

avatar mvanvu
mvanvu - comment - 17 Jul 2018

@coolcat-creations as suggested from @GeraintEdwards just like this showon="attribs.show_title:1,"

avatar coolcat-creations coolcat-creations - test_item - 17 Jul 2018 - Tested successfully
avatar coolcat-creations
coolcat-creations - comment - 17 Jul 2018

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.

avatar coolcat-creations
coolcat-creations - comment - 17 Jul 2018

Right, sorry - was not obvious to me that it reffered to global :)

avatar franz-wohlkoenig franz-wohlkoenig - change - 17 Jul 2018
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 17 Jul 2018

Ready to Commit after two successful tests.

avatar mbabker mbabker - change - 21 Jul 2018
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-07-21 01:08:41
Closed_By mbabker
Labels Added: ? ?
Removed: ?
avatar mbabker mbabker - close - 21 Jul 2018
avatar mbabker mbabker - merge - 21 Jul 2018

Add a Comment

Login with GitHub to post a comment