Example: How to use naming containers
- 1: <?php
- 3: /**
- 4: * Nette\Forms example 6
- 5: *
- 6: * - using naming containers
- 7: */
- 50: // Step 1: Define form with validation rules
- 53: // group First person
- 62: // group Second person
- 71: // group for buttons
- 78: // Step 2: Check if form was submitted?
- 81: // Step 2c: Check if form is valid
- 88: // this is the end, my friend :-)
- 90: }
- 93: }
- 97: // Step 3: Render form
- 98: ?>
- 99: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- 100: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- 101: <head>
- 102: <meta http-equiv="content-type" content="text/html; charset=utf-8" />
- 103: <meta http-equiv="content-language" content="en" />
- 105: <title>Nette\Forms example 6 | Nette Framework</title>
- 107: <style type="text/css">
- 108: <!--
- 109: .required {
- 110: color: darkred
- 111: }
- 113: fieldset {
- 114: padding: .5em;
- 115: margin: .3em 0;
- 116: background: #EAF3FA;
- 117: border: 1px solid #b2d1eb;
- 118: }
- 120: input.button {
- 121: font-size: 120%;
- 122: }
- 124: th {
- 125: width: 8em;
- 126: text-align: right;
- 127: }
- 128: -->
- 129: </style>
- 130: </head>
- 132: <body>
- 133: <h1>Nette\Forms example 6</h1>
- 136: </body>
- 137: </html>