maxkunes Posted June 16, 2018 Posted June 16, 2018 Using the code below, when selecting all of the items in a multi select form helper, the visually deselect although the stetting gets saved. If I only select one or any amount less than the total settings in the box, it works as expected. No java script errors occur. $packages = array(0 => 'Foo', 1 => 'Bar', 2 => 'Baz'); $form->add(new \IPS\Helpers\Form\Select('products_names_disable_multiple_quantities', \IPS\Settings::i()->products_names_disable_multiple_quantities, false, array('options' => $packages, 'multiple' => true))); Small gif for further explanation : https://i.gyazo.com/8396cb36ac45cd2f68deddc542fdc910.mp4
TAMAN Posted June 16, 2018 Posted June 16, 2018 $packages = array(0 => 'Foo', 1 => 'Bar', 2 => 'Baz'); $form->add( new \IPS\Helpers\Form\Select( 'products_names_disable_multiple_quantities', \IPS\Settings::i()->products_names_disable_multiple_quantities == '*' ? "*" : explode( ',', \IPS\Settings::i()->ss_aep), FALSE, array( 'options' => $packages, 'parse' => 'normal', 'multiple' => true, 'unlimited' => '*', 'unlimitedLang' => 'all' ), NULL, NULL, NULL, NULL ) );
maxkunes Posted June 16, 2018 Author Posted June 16, 2018 4 hours ago, TAMAN said: $packages = array(0 => 'Foo', 1 => 'Bar', 2 => 'Baz'); $form->add( new \IPS\Helpers\Form\Select( 'products_names_disable_multiple_quantities', \IPS\Settings::i()->products_names_disable_multiple_quantities == '*' ? "*" : explode( ',', \IPS\Settings::i()->ss_aep), FALSE, array( 'options' => $packages, 'parse' => 'normal', 'multiple' => true, 'unlimited' => '*', 'unlimitedLang' => 'all' ), NULL, NULL, NULL, NULL ) ); Is this the expected behavior, or is this a workaround to an ips bug?
bfarber Posted June 18, 2018 Posted June 18, 2018 For usability purposes, you should be using the proper 'unlimited' prompts for users as suggested.
maxkunes Posted June 19, 2018 Author Posted June 19, 2018 9 hours ago, bfarber said: For usability purposes, you should be using the proper 'unlimited' prompts for users as suggested. I question that that increases or improves usability at all. Do you have an example of the way you suggest?
bfarber Posted June 21, 2018 Posted June 21, 2018 We don't really use too many multiselects because some users find them confusing (if you can get away with a checkbox set that is a much better choice), but adding/editing an announcement is one area.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.