Skip to content
Browse files

MINOR Documentation on EmailField type attribute change

  • Loading branch information...
1 parent ef8651d commit e12a82e28fe07c4d33ba6ce39d0b4bb1e421018e @halkyon halkyon committed
Showing with 12 additions and 1 deletion.
  1. +11 −0 docs/en/changelogs/3.0.0.md
  2. +1 −1 forms/FormField.php
View
11 docs/en/changelogs/3.0.0.md
@@ -8,6 +8,7 @@
* Image/Link insertion moved into a modal dialog instead of a sidebar
* "Add pages" dropdown moved to a more descriptive modal dialog
* Renaming of sapphire to SilverStripe framework
+ * FormField classes now have their own HTML templates
* Allow usage of SilverStripe framework without the "cms" module
* CMS JavaScript moved to [jQuery.entwine](https://github.com/hafriedlander/jquery.entwine)
* CMS stylesheets are generated by SCSS to provide more flexible and robust styling
@@ -385,6 +386,16 @@ its no longer possible to set the following optional attributes via constructor
and `$folderName` (for `FileField` and `SimpleImageField`).
Please use the appropriate setters on the form field instance instead.
+### EmailField now uses type "email" instead of type "text" [email-form-field] ###
+
+EmailField now uses "email" for the `type` attribute, which integrates better with HTML5 features like
+form validation in the browser.
+
+If you want to change this back to "text", use `setAttribute()` when constructing the field:
+
+ $field = new EmailField('Email');
+ $field->setAttribute('type', 'text');
+
### Restructured files and folders [file-restructure]###
In order to make the SilverStripe framework useable without the `cms` module,
View
2 forms/FormField.php
@@ -316,7 +316,7 @@ function removeExtraClass($class) {
/**
* Set an HTML attribute on the field element, mostly an <input> tag.
*
- * Some attributes are best set through more specialized methods, to avoid interfereing with built-in behaviour:
+ * Some attributes are best set through more specialized methods, to avoid interfering with built-in behaviour:
* - 'class': {@link addExtraClass()}
* - 'title': {@link setDescription()}
* - 'value': {@link setValue}

0 comments on commit e12a82e

Please sign in to comment.
Something went wrong with that request. Please try again.