Welcome Guest, Not a member yet? Register   Sign In
how to give style to dropdown menu
#1

[eluser]dinu[/eluser]
Hi
i was adding a drop down to my codeIgniter file. But how can i give style to that...

$options = array('' => '- Select -',
'1' => 'One',
'2' => 'Two'
);
echo form_dropdown('options',$options);

How to give a class to this drop down..
Can anyone help me
#2

[eluser]InsiteFX[/eluser]
Look in the CodeIgniter User Guide form_helper dropdown the fourth parameter.

InsiteFx
#3

[eluser]dinu[/eluser]
But how to give, id and class in extra?
#4

[eluser]Piter[/eluser]
Code:
$js = 'id="shirts" onChange="some_function();"';

echo form_dropdown('shirts', $options, 'large', $js);

As the three parameters can be set_value('select_name')
#5

[eluser]dinu[/eluser]
ooo.. thank you so much..i was trying to pass it as an array
thank you so much




Theme © iAndrew 2016 - Forum software by © MyBB