?
avatar tassosm
tassosm
9 Feb 2017

Steps to reproduce the issue

Consider the following form

      <fieldset name="settings" label="LABEL">
        <fields name="fruites">
            <fields name="apple">
                <field name="enabled" type="radio" 
                    label="JENABLED" 
                    default="1">
                    <option value="1">JYES</option>
                    <option value="0">JNO</option>
                </field>
                <field name="price" type="text" 
                    showon="enabled:1" 
                    label="label1"
                />
            </fields>
        </fields>
    </fieldset>

Expected result

The price should be shown when we choose Yes on the enabled field

Actual result

The price field never shows up

System information (as much as possible)

Joomla! 3.7.0-beta2
PHP 7.0.15

Additional comments

Here's the produced showon attribute on Joomla 3.7.0-beta2
data-showon='[{"field":"jform[fruites.apple][enabled]","values":["1"],"sign":"=","op":""}]'

And here's the produced showon attribute on Joomla 3.6.5 which works
data-showon='[{"field":"jform[fruites][apple][enabled]","values":["1"],"op":""}]'

avatar tassosm tassosm - open - 9 Feb 2017
avatar joomla-cms-bot joomla-cms-bot - change - 9 Feb 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 9 Feb 2017
avatar tassosm tassosm - edited - 9 Feb 2017
avatar tassosm tassosm - change - 9 Feb 2017
Title
Showon doesn't work when using multilevel fields group
Showon stopped working on multilevel fields group
avatar tassosm tassosm - edited - 9 Feb 2017
avatar tassosm tassosm - change - 9 Feb 2017
Title
Showon stopped working on multilevel fields group
Showon stopped working with multilevel fields group
avatar tassosm tassosm - edited - 9 Feb 2017
avatar Bakual
Bakual - comment - 9 Feb 2017

I fixed something related to groups lately: #13549
But I wasn't aware that there can be more than one group. Then the groups parameter here liklely needs to be exploded and added for each group here: https://github.com/Bakual/joomla-cms/blob/staging/libraries/joomla/form/helper.php#L343

avatar tassosm
tassosm - comment - 9 Feb 2017

@Bakual, thanks. I've seen your fix and it didn't help.
Exploding the groups param should solve the issue indeed.

avatar Bakual
Bakual - comment - 9 Feb 2017

You want to do the PR?

avatar jeckodevelopment
jeckodevelopment - comment - 11 Feb 2017

Closing as we have a PR to test: #14007

avatar jeckodevelopment jeckodevelopment - change - 11 Feb 2017
Title
Showon stopped working with multilevel fields group
Showon stopped working with multilevel field groups
Status New Closed
Closed_Date 0000-00-00 00:00:00 2017-02-11 18:51:39
Closed_By jeckodevelopment
avatar jeckodevelopment jeckodevelopment - close - 11 Feb 2017

Add a Comment

Login with GitHub to post a comment