Page 1 of 1

Dynamic Drop down With Non selectable items

Posted: Mon May 09, 2011 9:43 pm
by dbarron87
Hello all, hopefully i have put this in the right place.

I am currently trying to create a drop down list with data pulled from my database, but with non selectable items.

the drop down is fully working, with items being pulled from the db

it currently displays like below

avon
antrim
aberdeen

ect
however i would like it to be similar to below

England (non selectable)
avon
Northern Ireland(non selectable)
Antrim
Scotland(non selectable)
Aberdeen


I am able to create empty spaces (by making them null) but would rather this to be text.


Thank you for your help in advance

Re: Dynamic Drop down With Non selectable items

Posted: Tue May 10, 2011 2:24 pm
by tr0gd0rr
I think you need optgroup tags.