?
avatar simbunch
simbunch
15 Dec 2019

Ver. Joomla 4.0 Alpha 12

Steps to reproduce the issue

Using the example at the bottom of this page: https://docs.joomla.org/List_form_field_type

<field
    name="fielda"
    type="list"
    label="FIELDA_LABEL"
    description="FIELDA_DESC"
    >
    <option value="editor">TYPE_EDITOR</option>
    <option value="text">TYPE_TEXT</option>
    <option value="textarea">TYPE_TEXTAREA</option>
</field>

<field
    name="fieldb"
    type="list"
    label="FIELDB_LABEL"
    description="FIELDB_DESC"
    >
    <option value="0">JNO</option>
    <option value="1">Option 1</option>
    <option
        showon="fielda:text,textarea"
        value="2">Option 2</option>
    <option
        showon="fielda:text"
        value="3">Option 3</option>
</field>

Expected result

Expected result is as described on the page:

  • "Option 3" of fieldb is only displayed if option "TYPE_TEXT" is selected in fielda.

  • "Option 2" of fieldb is only displayed if option "TYPE_TEXT" OR "TYPE_TEXTAREA" is selected in fielda.

  • "Option 1" and "JNO" of fieldb is always displayed.

Actual result

All options of fieldb are displayed no matter what.

Additional comments

Workaround is to add showon for fieldb itself: <field name="fieldb" showon="fielda:editor,text,textarea" [...]. The showon attribute on fieldb's options will then work as expected.

avatar simbunch simbunch - open - 15 Dec 2019
avatar joomla-cms-bot joomla-cms-bot - change - 15 Dec 2019
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 15 Dec 2019
avatar simbunch simbunch - change - 15 Dec 2019
The description was changed
avatar simbunch simbunch - edited - 15 Dec 2019
avatar simbunch simbunch - change - 15 Dec 2019
The description was changed
avatar simbunch simbunch - edited - 15 Dec 2019
avatar simbunch simbunch - change - 15 Dec 2019
Title
[Joomla 4] List field type with showon`` for options work only if field has `showon`
[4.0] List field type with showon`` for options work only if field has `showon`
avatar simbunch simbunch - edited - 15 Dec 2019
avatar simbunch simbunch - change - 15 Dec 2019
Title
[4.0] List field type with showon`` for options work only if field has `showon`
[4.0] List field type with `showon` for options work only if field has `showon`
avatar simbunch simbunch - edited - 15 Dec 2019
avatar simbunch
simbunch - comment - 27 Dec 2019

Fixed with beta1-dev

avatar simbunch simbunch - change - 27 Dec 2019
Status New Closed
Closed_Date 0000-00-00 00:00:00 2019-12-27 23:19:18
Closed_By simbunch
avatar simbunch simbunch - close - 27 Dec 2019

Add a Comment

Login with GitHub to post a comment