An enhanced FormHelper
- Allow configuration via Configure
FormConfig
- Allow easy enabling/disabling of
novalidate
this way globally throughout all forms
- 'novalidate' => false, // Set to true to disable HTML5 browser validation
- 'templates' => [...] // Define your own custom default templates for all widgets
Attach it to your controllers like so:
protected $helpers = ['Tools.Form'];
Alternatively, you can enable it in your AppView class.
// Inside your app.php config:
$config = [
'debug' => true,
...
'FormConfig' => array(
'novalidate' => true,
'templates' => array(
'dateWidget' => '{{day}}{{month}}{{year}}{{hour}}{{minute}}{{second}}{{meridian}}',
)
)
];