? Success

User tests: Successful: Unsuccessful:

avatar Fedik
Fedik
22 Mar 2015

This patch will fix showon feature, when it used on the field with multiple attribute

how to test
add two field in template, module or menu item configuration:

<field name="test1" type="list" label="Test 1">
    <option value="0">JNO</option>
    <option value="1">JYES</option>
</field>
<field name="test2" type="list" multiple="true" showon="test1:1" label="Test 2">
    <option value="1">Val 1</option>
    <option value="2">Val 2</option>
    <option value="3">Val 3</option>
    <option value="4">Val 4</option>
</field>

And try change the value in "text 1" field

expected result
Field "Test 2" must be visible only when in "Test 1" selected "Yes",

actual result
Field "Test 2" always visible

Apply patch and make sure that it work as expected.

avatar Fedik Fedik - open - 22 Mar 2015
avatar joomla-cms-bot joomla-cms-bot - change - 22 Mar 2015
Labels Added: ?
avatar zero-24 zero-24 - change - 22 Mar 2015
Easy No Yes
avatar zero-24 zero-24 - change - 22 Mar 2015
Category Libraries
avatar n9iels
n9iels - comment - 22 Mar 2015

@test without applying this patch, field "Test 2" is only visible when field "Test 1" is selected "Yes".
Tested on Joomla! 3.4.2-dev staging in the global configuration form.

avatar Fedik
Fedik - comment - 22 Mar 2015

@n9iels you mean that for you works good without this patch?
hm, strange

avatar n9iels
n9iels - comment - 22 Mar 2015

yes, for me it works good without this patch. Mebay someone else can test this PR to?

avatar Fedik
Fedik - comment - 23 Mar 2015

well, @n9iels you are right in global configuration it works,
but in other places do not works (template, module, menu xml)...
now I understand nothing, hm

avatar Fedik
Fedik - comment - 23 Mar 2015

ok, answer is simple, there the fields rendered in different way

please do test in other places: template, module or menu item configuration,
I updated the description

avatar n9iels
n9iels - comment - 23 Mar 2015

@test successful, now it works as expected :-) Tested in mod_custom


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6539.
avatar n9iels n9iels - test_item - 23 Mar 2015 - Tested successfully
avatar alikon
alikon - comment - 27 Mar 2015

@test successful

p.s.
maybe could be out of scope of this pr
i was wondering about this scenario

<select name="mys">
    <option value="" disabled="disabled" selected="selected">Please select an option</option>
    <option value="1">One</option>
    <option value="2">Two</option>
      ....
      ....
    <option value="n">n-option</option>
</select>

in this situation could be usefull to trigger the showon feature when any of a "real" options is selected

the .xml syntax could be something like this:

showon="mys:*"

cause this syntax

showon="mys:1,2,...n"

could not be suitable if the parent select option values are dynamic (ie loaded from a query)

what do you think ?

avatar Fedik
Fedik - comment - 27 Mar 2015

@alikon for this need change the script that toggle visibility,
I think if allow to use RegExp (like showon="mys:(.*)") then it will be a lot more powerful,
but it a lot more complex task

avatar alikon
alikon - comment - 29 Mar 2015

using RegExp became too complex imho even if more powerfull,
i like power of simplicity

avatar zero-24 zero-24 - change - 29 Mar 2015
Status Pending Ready to Commit
avatar zero-24 zero-24 - alter_testresult - 29 Mar 2015 - alikon: Tested successfully
avatar zero-24
zero-24 - comment - 29 Mar 2015

RTC Thanks for tests and coding here!


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6539.
avatar zero-24 zero-24 - change - 30 Mar 2015
Labels Added: ?
avatar zero-24 zero-24 - close - 4 Apr 2015
avatar wilsonge wilsonge - change - 4 Apr 2015
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2015-04-04 12:58:10
avatar wilsonge wilsonge - close - 4 Apr 2015
avatar wilsonge wilsonge - reference | - 4 Apr 15
avatar wilsonge wilsonge - merge - 4 Apr 2015
avatar wilsonge wilsonge - close - 4 Apr 2015
avatar Yves-K Yves-K - test_item - 28 Jul 2015 - Tested unsuccessfully
avatar zero-24 zero-24 - change - 14 Oct 2015
Labels Removed: ?

Add a Comment

Login with GitHub to post a comment