Welcome Guest, Not a member yet? Register   Sign In
Need Help
#1

[eluser]phpfresher[/eluser]
Here is the sample of my drop down select box:
<?php
echo form_dropdown('module_id',$list_of_module,'1',$attribute);
?>
Problem: i need to add the id field in the select box
Here is the sample output that i need:
<select name="module_id" id="module_id">
........
#2

[eluser]MathBoon[/eluser]
Code:
function form_dropdown($name = '', $options = array(), $selected = array(), $extra = '')
//$extra is extra html code

Seems like you're already doing it, so where's you problem?

Code:
echo form_dropdown(‘module_id’,$list_of_module,‘1’,$attribute);

$attribute is your extra html code, put "id='module_id'" in there.




Theme © iAndrew 2016 - Forum software by © MyBB