?
avatar cn-tools
cn-tools
26 Feb 2017

Steps to reproduce the issue

<field name="masterfield" type="radio" default="1" class="btn-group btn-group-yesno" label="MasterField" >
	<option value="0">unknown</option>
	<option value="1">value 1</option>
	<option value="2">value 2</option>
</field>
<field name="subfield" type="radio" default="1" showon="masterfield!:0" class="btn-group btn-group-yesno" label="SubField" >
	<option value="1">Show text field</option>
	<option value="2">Show URL field</option>
</field>
<field name="subText" showon="masterfield!:0[AND]subfield:1" type="text" default="" label="Text" />
<field name="subURL" showon="masterfield!:0[AND]subfield:2" size="20" type="url" default="" label="URL" />

Expected result

the subfield AND subText/subURL should only displayed if value of masterfield is not 0.

Actual result

the subfield is shown always and the fields subText and subURL ignore value of masterfield also.

System information (as much as possible)

v3.7.0-beta3

Additional comments

i add a demo plug-in to reproduce the issue easy
plg_issue_showon_sign.zip

avatar cn-tools cn-tools - open - 26 Feb 2017
avatar joomla-cms-bot joomla-cms-bot - change - 26 Feb 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 26 Feb 2017
avatar cn-tools cn-tools - edited - 26 Feb 2017
avatar cn-tools cn-tools - change - 26 Feb 2017
The description was changed
avatar cn-tools cn-tools - edited - 26 Feb 2017
avatar jjaracz
jjaracz - comment - 2 Mar 2017

Hi @cn-tools

At this time there is no support for "!:" expression.
Have a look of that line of code :)
https://github.com/chivitli/joomla-cms/blob/99421f335e6667c1473562c8d5ab3f503fda8d5d/libraries/joomla/form/field.php#L919

Before ":" could be only name of field. For resolve your problem, this should work :)
showon="masterfield:1,2[AND]subfield:1"

avatar joomla-cms-bot joomla-cms-bot - change - 2 Mar 2017
The description was changed
avatar joomla-cms-bot joomla-cms-bot - edited - 2 Mar 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 30 Mar 2017
Category com_tags Fields
avatar franz-wohlkoenig franz-wohlkoenig - change - 30 Mar 2017
The description was changed
avatar joomla-cms-bot joomla-cms-bot - change - 30 Mar 2017
The description was changed
avatar joomla-cms-bot joomla-cms-bot - edited - 30 Mar 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 30 Mar 2017
Category com_tags Fields Fields
avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Apr 2017
Status New Expected Behaviour
Closed_Date 0000-00-00 00:00:00 2017-04-04 16:41:43
Closed_By franz-wohlkoenig
avatar joomla-cms-bot joomla-cms-bot - change - 4 Apr 2017
Status Expected Behaviour New
avatar joomla-cms-bot joomla-cms-bot - edited - 4 Apr 2017
avatar joomla-cms-bot joomla-cms-bot - change - 4 Apr 2017
The description was changed
Status New Closed
Closed_By franz-wohlkoenig joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 4 Apr 2017
avatar joomla-cms-bot
joomla-cms-bot - comment - 4 Apr 2017
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 4 Apr 2017

Closed as expected Behaviour (comment above)


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

Add a Comment

Login with GitHub to post a comment