Can i use optgroup in select ?

Discuss about features you want to see in the next versions of ApPHP DataGrid. Your requests and offers.

Moderators: ne_moj, zewa

mbnaj
Newbie
Newbie
Posts: 4
Joined: Mar 1st, '11, 00:33

Can i use optgroup in select ?

Postby mbnaj » Aug 5th, '12, 10:53

Hello

i want to use optgroup in select item

such like this

<select>
<optgroup label="Swedish Cars">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
</optgroup>
<optgroup label="German Cars">
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</optgroup>
</select>


Please tell he how ?

administrator
Site Admin
Site Admin
Posts: 5939
Joined: Jan 7th, '09, 23:18
Contact:

Re: Can i use optgroup in select ?

Postby administrator » Aug 6th, '12, 07:17

Where exactly?
If you use "enum" type of field - you may prepare "source"=>$my_arr

where $my_arr = array(
'1'=>'1',
'2'=>array('volvo'=>'Volvo', 'saab'=>'Saab')
'3'=>'3'
)

mbnaj
Newbie
Newbie
Posts: 4
Joined: Mar 1st, '11, 00:33

Re: Can i use optgroup in select ?

Postby mbnaj » Aug 6th, '12, 08:22

Thank you for replay
yes i used enum
I test it but i see the second option in select box is "Array"

please advice

administrator
Site Admin
Site Admin
Posts: 5939
Joined: Jan 7th, '09, 23:18
Contact:

Re: Can i use optgroup in select ?

Postby administrator » Aug 7th, '12, 07:32

Try it with the last version 7.4.9

gavind
Junior
Junior
Posts: 14
Joined: Nov 8th, '12, 22:41

Re: Can i use optgroup in select ?

Postby gavind » Mar 2nd, '13, 14:27

Hi mbnaj, I believe that this feature was just implemented on the later versions. Just to verify, what version are you using here by the way?
Mastery through mistakes. Image


Return to “ApPHP DataGrid {future features}”