Select Multiple field - how to select all

Questions related to using nuBuilder Forte.

Select Multiple field - how to select all

Postby Janusz » Tue Apr 30, 2019 1:00 am

I use the Select Multiple box - and in the default initial state all values are in the "not selected" status what is normal.
Is it possible by any command to select automatically all values (instead of clicking all of them) and the best to select only defined values except the first empty field.
Janusz
 
Posts: 229
Joined: Fri Dec 28, 2018 10:11 pm
Location: Krakow, Poland

Re: Select Multiple field - how to select all

Postby Janusz » Tue Apr 30, 2019 5:37 am

in the mean time I found the solution:

FYI
the first line selects all elements and the second one deselects the first empty row
Code: Select all
$('#search_field_multi option').prop('selected', true);
$('#search_field_multi option:eq(0)').prop('selected', false);
Janusz
 
Posts: 229
Joined: Fri Dec 28, 2018 10:11 pm
Location: Krakow, Poland

Re: Select Multiple field - how to select all

Postby kev1n » Tue Apr 30, 2019 3:53 pm

Or hit Ctrl+A to select all
kev1n
 
Posts: 276
Joined: Mon Oct 15, 2018 2:13 am


Return to General