addGroup(); $form->addText('query', 'Search:')->setHtmlType('search')->setHtmlAttribute('autofocus'); $form->addText('count', 'Number of results:')->setHtmlType('number')->setDefaultValue(10)->addRule($form::INTEGER, 'Must be numeric value')->addRule($form::RANGE, 'Must be in range from %d to %d', [1, 100]); $form->addText('precision', 'Precision:')->setHtmlType('range')->setDefaultValue(50)->addRule($form::INTEGER, 'Precision must be numeric value')->addRule($form::RANGE, 'Precision must be in range from %d to %d', [0, 100]); $form->addEmail('email', 'Send to email:')->setHtmlAttribute('autocomplete', 'off')->setHtmlAttribute('placeholder', 'Optional, but Recommended'); $form->addSubmit('submit', 'Send'); if ($form->isSuccess()) { echo '

Form was submitted and successfully validated

'; Dumper::dump($form->getValues()); exit; } ?> Nette Forms and HTML5

Nette Forms and HTML5

render(); ?>