From 9c7e66260f2e3bd232edbd6b4b0b20da0b8abb80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Wed, 2 Apr 2014 19:07:02 -0300 Subject: [PATCH] Talk about the HTML 5 disabling on the wrapper level [ci skip] --- README.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 17d57275..ded0ab9a 100644 --- a/README.md +++ b/README.md @@ -900,7 +900,29 @@ required attribute to force a value into an input and will prevent form submissi Depending on the design of the application this may or may not be desired. In many cases it can break existing UI's. -You can disable the browser validation: +It is possible to disable all HTML 5 extensions in **Simple Form** removing the `html5` component +from the wrapper used to render the inputs. + +For example, change: + +```ruby +config.wrappers tag: :div do |b| + b.use :html5 + + b.use :label_input +end +``` + +To: + +```ruby +config.wrappers tag: :div do |b| + b.use :label_input +end +``` + +If you want to have all other HTML 5 features, such as the new field types, you can disable only +the browser validation: ```ruby SimpleForm.browser_validations = false # default is true