form_dropdown -> optgroup validation issue - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: form_dropdown -> optgroup validation issue (/showthread.php?tid=19434) |
form_dropdown -> optgroup validation issue - El Forum - 06-07-2009 [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 form_dropdown -> optgroup validation issue - El Forum - 06-07-2009 [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? form_dropdown -> optgroup validation issue - El Forum - 06-07-2009 [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. form_dropdown -> optgroup validation issue - El Forum - 06-08-2009 [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"> form_dropdown -> optgroup validation issue - El Forum - 06-10-2009 [eluser]xpix[/eluser] Finally I found the problem I was giving a multidimensional array not a regular one. |