Skip to content
This repository has been archived by the owner on Nov 26, 2017. It is now read-only.

JForm -> Showon does not work if field has multiple=true #376

Open
e-it opened this issue May 14, 2015 · 3 comments
Open

JForm -> Showon does not work if field has multiple=true #376

e-it opened this issue May 14, 2015 · 3 comments

Comments

@e-it
Copy link

e-it commented May 14, 2015

Hello,

I just mentioned a little bug: If I want to use https://docs.joomla.org/Form_field#Showon I can not use the multiple-tag on the field that should be hidden, if field one has the value 0.

Example:


JYES
JNO

@izharaazmi
Copy link
Contributor

@SPQRInc Please use code block to put your example code. Currently it appears broken.

@e-it
Copy link
Author

e-it commented May 14, 2015

Oh, I'm sorry...

<field
    name="foo"
    type="list"
    >
    <option value="1">JYES</option>
    <option value="0">JNO</option>
</field>
<field
    name="bar"
    type="category"
    class="inputbox"
    extension="com_test"
    multiple="true"
    showon="foo:1"
/>

I also do not see an error in my Browsers Webdeveloper-Error-Console.

@e-it
Copy link
Author

e-it commented May 15, 2015

Hello again,

the other way around it does not work, too:

<fieldset   name="additional">
    <field  name="usergroup" 
            type="usergroup"
            label="COM_TEST_FIELD_USERGROUP"
            description="COM_TEST_FIELD_USERGROUP_DESC" 
            />
    <field
            name="bar"
            type="text"
            showon="usergroup:8" />

works, but

<fieldset   name="additional">
    <field  name="usergroup" 
            type="usergroup"
            multiple="true"
            label="COM_TEST_FIELD_USERGROUP"
            description="COM_TEST_FIELD_USERGROUP_DESC" 
            />
    <field
            name="bar"
            type="text"
            showon="usergroup:8" />

does not work (it's always visible here).

And (as I already said) the other way round does not work, too:

<field
    name="foo"
    type="list"
    >
    <option value="1">JYES</option>
    <option value="0">JNO</option>
</field>
<field
    name="bar"
    type="category"
    class="inputbox"
    extension="com_test"
    multiple="true"
    showon="foo:1"
/>

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants