osdemo

Form widgets

This page demonstrates form widgets from the Ot_form module. The first section shows a standard (non-reactive) form. The following sections show reactive widgets.

Standard form

A standard form showcasing all HTML input types. Values are read on submit.

Result:

reactive_input

A reactive text input. The value is displayed below in real time.

Value: hello

reactive_textarea

A textarea with auto-resize. Try typing multiple lines.

Value:

debounced_input

The raw signal updates on every keystroke. The debounced signal updates after 0.5s of inactivity. This is useful for example for search fields.

Raw:

Debounced:

password_input

A password input with a visibility toggle button.

Visible: false

reactive_select

A select element with reactive tracking.

Selected: fr

reactive_toggle_button

A button that alternates between on/off states.

State: OFF

checkbox

Checkboxes with different styles.

reactive_checkbox

A reactive checkbox. The state is tracked via a signal.

Checked: false

Manually changed: false

radio_buttons

A group of radio buttons with reactive selection.

Selection: 0

int_input / optional_int_input

Integer inputs with +/- buttons.

int_input:

Value: 42

optional_int_input:

Value: 10

reactive_date_input

An HTML5 date input with reactive signal.

Date: 2025-06-15

reactive_time_input

An HTML5 time input with reactive signal.

Time: 14:30

disableable_button

A button that can be reactively disabled. Use the toggle above to control it.

prevent_double_submit

This button disables itself while the action runs (2 seconds). Try clicking it rapidly.

input_validation_tools

Type a number. Validation error (shown after blur) if not even.

Result: Ok:

reactive_fieldset

A fieldset that can be reactively disabled. All elements inside become disabled.

Fieldset content:

lwt_bound_input_enter

Press Enter to trigger the action. The submitted value is shown below.

Submitted: