• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cannot assign html id attribute to select objects via form_dropdown() helper method

#1
[eluser]axiom82[/eluser]
Helper Method:
Code:
<? echo form_dropdown('can_assign_id', array(0 => 'No', 1 => 'Yes'), '0', " id=\"213\"" ?>

Result:
Code:
<select name="can_assign_id">
<option value="0" selected="selected">No</option>
<option value="1">Yes</option>
</select> id="213"

Expected Result:
Code:
<select name="can_assign_id" id="213">
<option value="0" selected="selected">No</option>
<option value="1">Yes</option>
</select>

An array with key/value pairs for attributes would be awesome.

#2
[eluser]axiom82[/eluser]
Strange, the issue fixed itself. You know what that means: user error Smile


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.