# packeta/trunk/deps/nette/forms/examples/template.latte

Packeta, version trunk. 30 lines.

- Page: https://pluginprobe.com/plugins/packeta/trunk/code/deps/nette/forms/examples/template.latte
- Raw: https://pluginprobe.com/plugins/packeta/trunk/raw/deps/nette/forms/examples/template.latte
- Modified: 2023-08-30T08:36:18+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/packeta/trunk/code/deps/nette/forms/examples/template.latte#L10-L20`.

```
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>Nette Forms rendering using Latte</title>
	<link rel="stylesheet" media="screen" href="assets/style.css" />
	<script src="https://nette.github.io/resources/js/3/netteForms.js"></script>
</head>

<body>
	<h1>Nette Forms rendering using Latte</h1>

	<form n:name=$form>
		<ul class=error n:ifcontent>
			<li n:foreach="$form->ownErrors as $error">{$error}</li>
		</ul>

		<table>
		<tr n:foreach="$form->controls as $input"
			n:if="!$input->getOption(rendered) && $input->getOption(type) !== hidden"
			n:class="$input->required ? required">

			<th>{label $input /}</th>
			<td>{input $input} <span class=error n:ifcontent>{$input->error}</span></td>
		</tr>
		</table>
	</form>
</body>
</html>

```
