Text Inputs

Text fields validate input, help users fix errors, autocomplete words, and provide suggestions. They allow users to enter either a single line or multiple lines of text. Text fields typically reside in forms but can appear in other places, like dialog boxes and search.

Learn more

To learn more about text input visit the Bootstrap documentation.
Legend
A longer block of help text that breaks onto a new line and may extend beyond one line.

Plain Text

Static controls are for placing plain text next to a form label in the context of a form.

Caleb.Peterson@BNSF.com

Checkboxes

Checkboxes allow the user to select one or more options from a set. It is usually best to present checkboxes in a vertical list. More than one column is acceptable as well if the list is long enough that it might require scrolling or if comparison of terms might be necessary.

Polyfill for Internet Explorer

Unlike Bootstrap, the GEL requires the presence of a <span class="checkbox-polyfill" /> immediately after the <input type="checkbox"> tag.

Switches

A switch, also known as a toggle button, allows the user to change a setting between two states. They are most effective when the on/off states are visually distinct.

Icons are appropriate for toggle buttons that allow a single choice to be selected or deselected, such as adding or removing a star to an item.

Custom component

Switches are a custom GEL component implemented as an <input [type="checkbox"]> with a different visual style.

Radios

Radio buttons are used to allow users to select one item at a time.

Polyfill for Internet Explorer

Unlike Bootstrap, the GEL requires the presence of a <span class="radio-polyfill" /> immediately after the <input type="radio"> tag.

Select / Multi-select

Select fields allow the user to pick from a predetermined list of options, such as a list of states or credit card types. The select fields can either show one and expand the list when the user clicks in the area or they can be listed out with a commit button, such as Submit or OK.

File Pickers

By default the HTML <input type="file" /> control does not allow styling via CSS attributes.

Therefore, the GEL styles an adjacent element, positions it over the <input type="file" /> element, and configures all mouse events to pass through to the underlying input.

Date / Time Pickers

The GEL recommends custom date and time pickers to get consistent cross-browser support.

Custom component

Date / time pickers are a custom GEL component.

Learn more

To learn more visit the Bootstrap Date/Time Picker documentation.

Additional JavaScript required

Two additional JavaScript files must be included:
https://bnsfweb.bnsf.com/gel/releases/4.latest/js/moment.min.js
https://bnsfweb.bnsf.com/gel/releases/4.latest/js/bootstrap-datetimepicker.js

React
React is supported via the react-bootstrap-datetimepicker wrapper.

Angular
Angular 2+ is supported via the ng2-eonasdan-datetimepicker wrapper.

Inline Date / Time Pickers

In addition to the default input with dropdown style, date / time pickers can be displayed inline.

Form Buttons

For lengthy or complex forms, it is recommended to place buttons on the left of the form, with the affirmative button to the left of the dismissive button.