Skip to content

Instantly share code, notes, and snippets.

@Kcko
Last active August 29, 2015 14:05
Show Gist options
  • Save Kcko/f3b40ba77dacdaec03e5 to your computer and use it in GitHub Desktop.
Save Kcko/f3b40ba77dacdaec03e5 to your computer and use it in GitHub Desktop.
Manuální renderování chyb -- inline
{form $form}
<ul class=error n:if="$form->ownErrors">
<li n:foreach="$form->ownErrors as $error">{$error}</li>
</ul>
<table>
<tr n:foreach="$form->controls as $input" n:class="$input->required ? required">
<th>{label $input /}</th>
<td>{input $input} <span class=error n:ifcontent>{$input->error}</span></td>
</tr>
</table>
{/form}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment