API reference
Built-in edit controls
You can use these controls by returning their name from an edit_control hook, or reference them for inspiration when authoring your own controls.
CheckboxControl
Renders a checkbox. Persists a 1 when checked, 0 otherwise.
See CheckboxControl on GitHub.
DateControl
Renders a timezone-aware date picker, with optional time picker.
Persists an ISO 8601 date or timestamp string.
Options:
t- iftrue, uses aTas the time separator; otherwise uses a spaceutc- iftrue, saves time in UTC timezone with aZsuffix; otherwise saves in user's local time with no zone suffixprecision- one ofdate,secsormillis; controls whether a date or time is persisted, and with what granularity
See DateControl on GitHub.
DropdownControl
Renders a dropdown. Persists the value field.
Options:
choices- an array of{ value: "value to store"; label: "Label to show" }objects
See DropdownControl on GitHub.
ForeignKeyControl
Renders an autocomplete box to pick a row from another table.
Options:
initialLabel- the initial label to showotherAutosuggestColumnUrl- the URL of the autosuggest endpointlabelColumn- the column to autosuggest
See ForeignKeyControl on GitHub.
JSONTagsControl
Renders a multiselect control to popular a JSON array of strings.
Options:
autosuggestColumnUrl- the URL of the autosuggest endpointcolumn- the column to autosuggest
See JSONTagsControl on GitHub.
NumberControl
Renders a text input that saves its value as a number.
See NumberControl on GitHub.
StringAutocompleteControl
Renders a free-form text input that also autocompletes against values from a column.
Options:
autosuggestColumnUrl- the URL of the autosuggest endpointcolumn- the column to autosuggest
See StringAutocompleteControl on GitHub.
StringControl
Renders a free-form single-line text input.
See StringControl on GitHub.
TextareaControl
Renders a free-form multi-line text input.
See TextareaControl on GitHub.