Reputation: 6085
how do i add id in this codeigniter select options
echo form_dropdown('selling', $ex_rates);?>
Upvotes: 1
Views: 416
Reputation: 17987
Read the userguide.
If you would like the opening to contain additional data, like an id attribute or JavaScript, you can pass it as a string in the fourth parameter:
$js = 'id="shirts" onChange="some_function();"';
echo form_dropdown('shirts', $options, 'large', $js);
Upvotes: 1