Jump to content

Issue with multiselect form helper.


maxkunes

Recommended Posts

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

 

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

Archived

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

  • Recently Browsing   0 members

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