<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" />
the subfield AND subText/subURL should only displayed if value of masterfield is not 0.
the subfield is shown always and the fields subText and subURL ignore value of masterfield also.
v3.7.0-beta3
i add a demo plug-in to reproduce the issue easy
plg_issue_showon_sign.zip
Labels |
Added:
?
|
Category | ⇒ | com_tags Fields |
Category | com_tags Fields | ⇒ | Fields |
Status | New | ⇒ | Expected Behaviour |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-04-04 16:41:43 |
Closed_By | ⇒ | franz-wohlkoenig |
Status | Expected Behaviour | ⇒ | New |
Status | New | ⇒ | Closed |
Closed_By | franz-wohlkoenig | ⇒ | joomla-cms-bot |
Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/14257
Closed as expected Behaviour (comment above)
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"