form_dropdown -> optgroup validation issue |
[eluser]xpix[/eluser]
Hi I am using the form dropdown functionality like Code: <div class="formrow"><?= form_label('Program: ', 'program') . form_dropdown('program',$programs_list);?></div> The output is: Code: <div class="formrow"><label for="program">Program: </label><select name="program"> The page doesn't validate on w3.org because of the optgroup. As you can see I have no need for the optgroup. Is there a way I can remove this tag? Thx
[eluser]Bill the Grue[/eluser]
<optgroup> is valid html (at least these guys think it's valid) What doctype are you using? Is optgroup the first validation error?
[eluser]xpix[/eluser]
It's the first error Code: # Error Line 89, Column 11: end tag for "optgroup" which is not finished I also use the formdropdown as multi select but I do not get this problem. Weird.
[eluser]Evil Wizard[/eluser]
The html validation error is because the <optgroup> tag is expecting to contain child elements, that is why it is unfinished, either contain the list within the optgroup or omit it. Code: <div class="formrow"> Code: <div class="formrow">
[eluser]xpix[/eluser]
Finally I found the problem I was giving a multidimensional array not a regular one. |
Welcome Guest, Not a member yet? Register Sign In |