Forum
Breaking Up Select Input
Hi,
I have a <perch:content type="select"
which is going to have quite a few options in it, and I would like to break it up somehow. Is there a way I can use <optgroup>
in Perch? Or set some disabled options to use as section headers perhaps? At the moment I am looking at using blank options to give some sort of breaks but can't provide any headers this way. It is a long list of colours so looking to split into "Greens", "Blues" etc.
Thanks!
Mike
In 2.8.14 you'll be able to add disabled items, but not opt groups yet.
Cool will sit tight for 2.8.14 as that will be fine for this. Cheers Drew
FWIW I used this for now, but it doesn't stop the user selecting it as an option:
Michael. If you add a pipe to the options you don't want selected and make the field required then it will show error when submitted because it will be an empty post. Just one of my little tricks
I typed that on my iPhone. Beware there could be errors.
Thanks Robert I will give that a go
Has this been implemented and if so how to use it? A disabled (first option) is perfect in place of a form label in some circumstances.
Thanks Chris