The WLineEdit class is an inline widget that provides a
single line edit.
A <WLineEdit> corresponds to an HTML
<input type="text"> element.
You can restrict its input using a validator providing immediate
client-side feedback. In the example below characters that aren't
numbers are not accepted. If you enter a number out of the
predefined range (0..130) then the widget colour is changed.
See Forms > Validation for more details.
The line edit below reacts on every 'key pressed' event. It also shows
how you can embed the label within the control (when empty).
WTextEdit is a full-featured editor for rich text editing. It
is based on the TinyMCE editor, which must be downloaded separately from
its author's website. The TinyMCE toolbar layout and plugins can be
configured through JWt's interface. The default layout - as shown below -
covers only a small portion of TinyMCE's capabilities.
A spin box is an inline widget to enter a number; WSpinBox is
an input control for integer numbers, while WDoubleSpinBox is
an input control for fixed point numbers. A spin box consists of a line
edit, and buttons which allow to increase or decrease the value.
A user may be steered to providing correct input by providing an
input mask. The input mask indicates the expected format and
constrains the user to provide data only in the expected format.
In the example below we use an input mask to ask the user to
enter an IP address.
Prepended and appended inputs
Adding on top of the standard input controls, the
Bootstrap theme includes other useful form components
like prepended/appended inputs. You can add text or buttons before and/or
after any text-based input using the .input-prepend and
.input-prepend classes respectively. Note that select elements
are not supported.
Wrap an .add-on and an input control with one of two classes to
prepend or append text to an input. You could also use both classes and
two instances of .add-on to prepend and append an input at once.