Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted June 16, 20186 yr 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
June 16, 20186 yr $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 ) );
June 16, 20186 yr Author 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?
June 18, 20186 yr For usability purposes, you should be using the proper 'unlimited' prompts for users as suggested.
June 19, 20186 yr Author 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?
June 21, 20186 yr 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.
Archived
This topic is now archived and is closed to further replies.