Low Options - ability to remove 'Please choose' for use in multi-selects
Hi Low,
I'm using the Low Options plugin with Low Search. I've just changed some search fields from a select, to a multi-select. Once I did this, I noticed that the 'Please choose' option looked out of place inside a multi-select, but I can't figure out a way to get rid of this.
Is there a parameter that can be used to remove this? I couldn't see any on the GitHub page but I wondered if there was anything undocumented?
Or if not, I guess this is a feature request. The ability to specify what this message is, as well as being able to disable it, would also be useful.
Thanks,
Stephen
Replies
Low 17 Jun 2013 06:44
There isn't a way to remove it automatically. It just takes whatever is in the options and outputs that.
You could of course check against the value itself and only show items that are not equal to that, using an {if option:value != ''} conditional.
Stephen 17 Jun 2013 11:05
Hi Low,
Thanks for confirming that this isn't possible at the moment.
Thanks for the conditional suggestion - I'll give this a try, though some of my fields have hundreds of options so I have a feeling that this would be a performance hit.
I think this topic would make an excellent feature request, as always. ;-)
Thanks,
Stephen
Stephen 25 Jun 2013 10:29
For info, I had the same issue with VZ Picky (which I also use in conjunction with Low Search, but does a different job to Low Options) when using it in multi-selects, and this feature has now been added to that: http://devot-ee.com/add-ons/support/v...
Low 27 Jun 2013 20:08
Grab version 0.2.0 from GitHub and see if the ignore="" parameter would work for you.
Stephen 27 Jun 2013 21:10
Hi Low,
That works great, thanks. :-)
One note though - I found that as the values I was wanting to hide were blank, the ignore parameter hid them by default anyway, even without me setting it as ignore="".
This is fine for me, and is preferable behaviour to what it was previously as I can simply hard-code the 'Please choose' values if I want them to appear anywhere, but just thought I'd mention this in case it wasn't what you intended.
Thanks,
Stephen
Low 28 Jun 2013 14:43
Good point. Will need to address that.