Example: How to change charset
- 1: <?php
- 3: /**
- 4: * Nette\Forms example 7
- 5: *
- 6: * - custom charset encoding (Forms internally works in UTF-8 encoding!)
- 7: */
- 33: // Step 1: Define form with validation rules
- 37: // group Personal data
- 50: // group for buttons
- 57: // Step 2: Check if form was submitted?
- 60: // Step 2c: Check if form is valid
- 69: // this is the end, my friend :-)
- 71: }
- 74: // not submitted, define default values
- 83: }
- 87: // Step 3: Render form
- 88: ?>
- 89: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- 90: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- 91: <head>
- 93: <meta http-equiv="content-language" content="en" />
- 95: <title>Nette\Forms example 7 | Nette Framework</title>
- 97: <style type="text/css">
- 98: <!--
- 99: .required {
- 100: color: darkred
- 101: }
- 103: fieldset {
- 104: padding: .5em;
- 105: margin: .3em 0;
- 106: background: #EAF3FA;
- 107: border: 1px solid #b2d1eb;
- 108: }
- 110: input.button {
- 111: font-size: 120%;
- 112: }
- 114: th {
- 115: width: 8em;
- 116: text-align: right;
- 117: }
- 118: -->
- 119: </style>
- 120: </head>
- 122: <body>
- 123: <h1>Nette\Forms example 7</h1>
- 126: </body>
- 127: </html>