Jump to content

Issue with multiselect form helper.


maxkunes

Recommended Posts

Posted

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

 

Posted
$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 ) );

 

Posted
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?

Posted
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?

Posted

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.

image.png

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...