Inputselect get style for marking all items.

Features wanted...
Post Reply
eil
Posts: 1617
Joined: 13 Jan 2011 19:44

Inputselect get style for marking all items.

Post by eil »

More than in half of situations when i use Inputselect, it's not for selecting some among many results, but for excluding some among all. So each time i have to do all this "add + to get items pre-marked" cycle. Quite bothersome!
Can Imputselect please get some parameter for preselecting all items from the start?
Win 7 SP1 x64 100% 1366x768

eil
Posts: 1617
Joined: 13 Jan 2011 19:44

Re: Inputselect get style for marking all items.

Post by eil »

May it happen?
Win 7 SP1 x64 100% 1366x768

eil
Posts: 1617
Joined: 13 Jan 2011 19:44

Re: Inputselect get style for marking all items.

Post by eil »

So may Inputselect() get "pre-select all" parameter? I'd propose "Pre-select only one" parameter to be improved.
Win 7 SP1 x64 100% 1366x768

LittleBiG
Posts: 1846
Joined: 08 Apr 2011 12:57
Location: Win10x64

Re: Inputselect get style for marking all items.

Post by LittleBiG »

I am just wondering why you didn't do it already by yourself... Like this, very roughly:

Code: Select all

//my inputselect to select all
 function inputselect2($list, $separator) {
   return inputselect(,"+".replace($list,$separator,$separator."+"),$separator,2);
 }
 echo inputselect2("a|b|c|d","|");

eil
Posts: 1617
Joined: 13 Jan 2011 19:44

Re: Inputselect get style for marking all items.

Post by eil »

My wish is exactly about not having to add this transformation codes each time, especially as Inputselect() function already has pre-select option, but for some reason only for 1 item.(never actually had a situation when i needed one pre-selected, only all or none)
Probably i can say that this strange-single-pre-select is my trigger, it exists while more useful option doesn't.
Win 7 SP1 x64 100% 1366x768

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Inputselect get style for marking all items.

Post by admin »

Just logically reverse the results (treat checked as unchecked).

* * *

Whatever, I added it.

eil
Posts: 1617
Joined: 13 Jan 2011 19:44

Re: Inputselect get style for marking all items.

Post by eil »

Thank you!
Win 7 SP1 x64 100% 1366x768

Post Reply