--- title: Form deprecated: true indexing: false --- The following form classnames are deprecated and will be removed in a future release. - `env-form-element` - `env-form-element__label` - `env-form-element__control` - `env-form-element__control--icon` - `env-form-element__contenteditable-placeholder` - `env-form-element__help` - `env-form-element--error` - `env-form-element--success` - `env-form-element--danger` - `env-form-input-group` - `env-form-input-group__label` - `env-form-multiple-select` - `env-checkbox__fake` - `env-checkbox__label` - `env-switch__label` - `env-switch__text` - `env-switch__slider` - `env-form__row` - `env-form--horizontal` - `env-form--inline` - `env-form-element--{1-6}` - `env-radio--disabled` - `env-checkbox--disabled` Additionaly, the following combinations of element type and classname are deprecated and will be removed in a future release. - `label.env-radio` - `div.env-checkbox` - `div.env-switch` ## Text input element ```html
``` ### Search input element ```html
``` ## Textarea element ```html
``` ### Contenteditable element ```html
Contenteditable
Placeholder text
``` ## Select element Native select element with class `env-form-input`. Only light styling, might look different in different browsers. ```html
``` ## Select component A select element wrapped in an element with class `env-form-select` will have the same appearance cross browsers. Use an `env-icon` for the arrow. ```html
``` ### Tag select component See [Tag select documentation](/forms/tag-select/). ```html
``` ## Radiobutton input element Related radiobutton elements should be wrapped by a fieldset element to indicate group membership of the contained elements. ```html
Radio button
``` ## Checkbox input element ```html
Checkbox
``` ### Switch component ```html
Switch
```
## Icons in input fields ```html
``` ## Input group Join text, input and button with `env-form-input-group`. ```html
``` ## Form layouts ### Common elements #### .env-form By itself the class is only a wrapper that sets the text-size-adjust property to control the text inflation for some smartphones and tablets. May be used with modifiers `.env-form--horizontal` and `.env-form--inline` for variations in form layout. #### .env-form\_\_row Wrap `env-form-element` in `env-form__row` to place them horizontally. #### .env-form-element Generic form input wrapper that sets spacing between elements. #### .env-form-element\_\_label Generic label class to set style and spacing for input labels. #### .env-form-element\_\_control Wrapper for form elements. Required for inputs with [icons](#input-icons) and a few other cases. ```html
``` ### Horizontal To create a horizontal form (horizontally align labels with input), apply modifier `.env-form--horizontal` to the form wrapper. The label of the element takes up 20% of the width and the `.env-form-element__control` uses the remaining width. ```html
Subjects
``` ### Inline Apply modifier `.env-form--inline` to the form wrapper to display elements inline. ```html
``` ### Hybrid To position multiple elements on a row, wrap target elements (`.env-form-element`) with a `.env-form__row` container. Use modifer `.env-form-element--*` to specify the length of an element, relative to other elements on the row. Valid values `1-6`. Default is `1` ```html
``` ## Help text Use `.env-form-element__help` for help texts associated with a form element. The `aria-describedby` attribute should be used to reference the `ID` of the text that describes the element. ```html
Enter a secure password ``` ## States For disabled legacy radio buttons, apply modifier `.env-radio--disabled` to its wrapper for a muted label. ```html
``` ## Validation Add modifier `.env-form-element--error` to define error validation state. The `aria-describedby` attribute should be used to reference the `ID` of the text that describes the element. Error validation state uses the Status color [Error text](/utils/colors/#status-colors). ```html

Error feedback

``` Modifiers `.env-form-element--success` and `.env-form-element--danger` are deprecated. ```html
Success feedback
Danger feedback
```