/** * Renders the whole form, wrapping a table in <form> tags. * * @param Form $form * * @return string * * @since 2.0 */ public function renderForm(Form $form) { $content = ''; foreach ($form as $element) { $content .= $this->render($element); } $form->setAttribute('role', 'form'); return Html::tag('form', $form->getAttributes(), $content); }
/** * Renders the whole form, wrapping a table in <form> tags. * * @param Form $form * * @return string * * @since 2.0 */ public function renderForm(Form $form) { foreach ($form as $element) { $this->render($element); } $tableRender = new SimpleTable(); $tableContent = $tableRender->renderTable($this->table); return Html::tag('form', $form->getAttributes(), $tableContent); }