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