Fix: W3C. Input fields can be between a table and tr tag.

This commit is contained in:
Laurent Destailleur 2014-01-05 18:30:35 +01:00
parent 667908baf8
commit 5b40eff0fa

View File

@ -2525,6 +2525,19 @@ class Form
if (is_array($formquestion) && ! empty($formquestion)) if (is_array($formquestion) && ! empty($formquestion))
{ {
// First add hidden fields and value
foreach ($formquestion as $key => $input)
{
if (is_array($input) && ! empty($input))
{
if ($input['type'] == 'hidden')
{
$more.='<input type="hidden" id="'.$input['name'].'" name="'.$input['name'].'" value="'.dol_escape_htmltag($input['value']).'">'."\n";
}
}
}
// Now add questions
$more.='<table class="paddingrightonly" width="100%">'."\n"; $more.='<table class="paddingrightonly" width="100%">'."\n";
$more.='<tr><td colspan="3" valign="top">'.(! empty($formquestion['text'])?$formquestion['text']:'').'</td></tr>'."\n"; $more.='<tr><td colspan="3" valign="top">'.(! empty($formquestion['text'])?$formquestion['text']:'').'</td></tr>'."\n";
foreach ($formquestion as $key => $input) foreach ($formquestion as $key => $input)
@ -2584,10 +2597,6 @@ class Form
$more.=$input['value']; $more.=$input['value'];
$more.='</td></tr>'."\n"; $more.='</td></tr>'."\n";
} }
else if ($input['type'] == 'hidden')
{
$more.='<input type="hidden" id="'.$input['name'].'" name="'.$input['name'].'" value="'.$input['value'].'">';
}
} }
} }
$more.='</table>'."\n"; $more.='</table>'."\n";