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

[eluser]phpfresher[/eluser]
I need the following output:
<select name = "XXX" id="XXX" class="xxx">
<option value="">XXX</option>
<option value="">XXX</option>
</select>
Here is my code:
&lt;?php
$js = 'id="module_id"';
echo form_dropdown('module_id',$list_of_module,$js);
?&gt;
And this code outputs only :
<select name = "module_id" >
<option value="">XXX</option>
<option value="">XXX</option>
</select>

How can i insert id into select box or drop down box need help
#2

[eluser]Sudz[/eluser]
Put $js as a fourth parameter in form_dropdown() as shown below.
3rd parameter is a default value you want to be selected on form load.

Code:
$js = 'id=“module_id”';
echo form_dropdown(‘module_id’,$list_of_module,'0',$js);




Theme © iAndrew 2016 - Forum software by © MyBB