Skip to main content
MUI Form & Table

Form field reference for App Engine

All field types of a form in App Engine scripts with their properties, plus conditions, validation rules and sections.

POSTED: | UPDATED: | by Stefan Schüttenkopf

This page lists every field type you can put into a form in an App Engine script and the properties each one accepts. It applies to version 17.2. How to create and mount a form is described in Form configuration in AppEngine.

Field types at a glance

A field is an object in the fields array of a section. Its type decides what is rendered.

typeWhat the user seesValue
text, passwordA single-line input. With password the input is masked.string
numberAn input that accepts numbers only.number
textareaA multi-line input.string
selectA drop-down list with one or several selectable options.string or number, or an array of them
checkboxA checkbox.boolean
toggleA switch.boolean
radio-group, radio-group-numberA group of radio buttons, with string or numeric values.string or number
button-groupA row of buttons of which one is selected.string or number
sliderA slider on a scale.number or an array of numbers
date-picker, only-date-picker, only-time-pickerA picker for date and time, date only or time only.Date
colorA color picker.string (hex color)
fileA file upload.File
labelText without input.none
actionA button with an icon that runs your function.none
select-from-tableA field whose value is picked from a table in a dialog.the selection made in the table

Properties of every field

All field types accept these properties. The tables further down list only what a type adds.

PropertyTypeRequiredDescription
nameDotNestedKeys<T>yesThe name of the field, used to identify its value within the form.
For nested objects, a dot-separated string is used (e.g., "parent.child").
grid{ xs: number; sm: number; md: number; lg: number; }noDefines the field's layout within a grid using system breakpoints.
xs, sm, md, lg: Specify the field width for various screen sizes (from 1 to 12). Defaults to 12 for all breakpoints.
labelstringnoThe field label shown to the user.
reValidateOnChangePath<T>[] | string[]noOne or more fields that determine when the field should be re-validated upon value change.
sxSxProps<Theme>noCustom styles (MUI system props) for the field wrapper.
Built-in field components apply sx on their shared outer wrapper, so nested selectors can be used to style inner MUI elements per field instance.
conditionCondition | Condition[]noRules that change the field depending on the values of other fields. See Conditions.
showRequiredAsteriskbooleannoShows the asterisk for required fields next to the label. This is visual only. To make the field required, add a rule to validation.
visiblebooleannoIndicates whether the field is visible.
disabledbooleannoIndicates whether the field is disabled.
validationArray<ValidationRules & { message?: string }>noThe validation rules of the field, each with an optional message. See Validation rules.
placeholderstringnoPlaceholder text shown inside the input.

Use visible, disabled and showRequiredAsterisk when the value comes from your script. Use a condition when it depends on what the user enters in another field.

Text and password

type: 'text' or type: 'password'

PropertyTypeRequiredDescription
asyncValidationbooleannoIndicates whether to show a loading indicator during asynchronous validation.
placeholderstringnoText displayed as a placeholder inside the field.
onChange(value: string) => voidnoA callback function triggered when the field value changes.

Number

type: 'number'

PropertyTypeRequiredDescription
asyncValidationbooleannoIndicates whether to show a loading indicator during asynchronous validation.
groupingbooleannoDetermines whether to use digit grouping (e.g., thousand separators). Defaults to true.
decimalSeparatorstringnoSpecifies the character used as the decimal separator. Defaults based on locale.
placeholderstringnoText displayed as a placeholder inside the field.
onChange(value: number) => voidnoA callback function triggered when the field value changes. Receives the current value as a number.

Text area

type: 'textarea'

PropertyTypeRequiredDescription
asyncValidationbooleannoDetermines whether to show a loading indicator during asynchronous validation.
onChange(value: string) => voidnoCallback function triggered when the field value changes. Receives the current value as a string.

Select

type: 'select'

PropertyTypeRequiredDescription
optionsKeystringnoA key used to retrieve options from the React Hook Form context.
optionsIOption[]noThe options of the list. Each option is an object with label (the text shown) and value (a string or number).
nullablebooleannoDetermines whether the field can be empty. Defaults to false.
multiplebooleannoDetermines whether the user can select multiple options. Defaults to false.
onChange(value: StringOrNumber | StringOrNumber[]) => voidnoA callback function triggered when the field value changes. Receives the current value as a string or number (or an array of these values if multiple is true).

To change the options depending on another field, use a condition of type options. See Conditions.

Checkbox and toggle

type: 'checkbox' and type: 'toggle' have one property of their own.

PropertyTypeRequiredDescription
onChange(value: boolean) => voidnoCalled when the value changes.

Radio group

type: 'radio-group' for string values, type: 'radio-group-number' for numeric values

PropertyTypeRequiredDescription
buttons{ label: string; value: StringOrNumber }[]yesAn array of objects, each containing:
label: Text displayed next to the radio button.
value: Value sent when this radio button is selected. Can be a string or number.
onChange(value: StringOrNumber) => voidnoCallback function triggered when the field value changes. Receives the current value as a string or number.

Button group

type: 'button-group'

PropertyTypeRequiredDescription
buttons{ label: string; value: StringOrNumber }[]yesAn array of objects, each containing:
label: Text displayed on the button.
value: Value sent when this button is selected. Can be a string or number.
onChange(value: StringOrNumber) => voidnoCallback function triggered when the field value changes. Receives the current value as a string or number.

Slider

type: 'slider'

PropertyTypeRequiredDescription
showValuebooleannoDetermines whether to display the current slider value. Defaults to false.
scale{ min: number; max: number; step?: number }yesAn object defining the slider range:
min: Minimum slider value.
max: Maximum slider value.
step: Increment step for value changes. Defaults to 1.
onChange(value: number | number[]) => voidnoCallback function triggered when the slider value changes. Receives the current value as a number or an array of numbers (for range sliders).

Date and time

type: 'date-picker' for date and time, type: 'only-date-picker' for the date, type: 'only-time-picker' for the time

PropertyTypeRequiredDescription
ampmbooleannoDetermines whether to use 12-hour format with AM/PM. Defaults based on locale.
disableFuturebooleannoDisables selection of future dates. Defaults to false.
disablePastbooleannoDisables selection of past dates. Defaults to false.
minDateDate | stringnoMinimum selectable date/time. Accepts a Date object or ISO string. Dates before this value will be disabled in the picker. For 'date-picker' type, both date and time are constrained. For 'only-time-picker', only the time portion is used.
maxDateDate | stringnoMaximum selectable date/time. Accepts a Date object or ISO string. Dates after this value will be disabled in the picker. For 'date-picker' type, both date and time are constrained. For 'only-time-picker', only the time portion is used.
utcFormatbooleannoDisplays date and time in UTC format. Defaults to false.
onChange(value: Date) => voidnoCallback triggered on value change. Receives the current value as a Date object.

Example: a date that must lie within the year 2026.

{
	name: 'inspectionDate',
	type: 'only-date-picker',
	label: 'Inspection date',
	minDate: '2026-01-01',
	maxDate: '2026-12-31'
}

Color

type: 'color'

PropertyTypeRequiredDescription
hasLabelbooleannoDetermines whether to display the field label. Defaults to false.
onChange(value: string) => voidnoCallback function triggered when the field value changes. Receives the current value as a string (hex color code).

File

type: 'file'

PropertyTypeRequiredDescription
acceptstringnoComma-separated list of accepted file types (forwarded to the underlying <input type="file"> accept attribute), for example 'image/*' or '.png,.jpg'.
downloadablebooleannoIf true, after upload it shows an option to download the uploaded file. Defaults to false.
withImagePreviewbooleannoIf the file is an image, determines whether to show an image preview for the uploaded file. Defaults to false.

Label

type: 'label' shows the label text and takes no input. Its name can be any string; it does not have to be a key of the form data.

Action

type: 'action' renders a button. Its name can be any string.

PropertyTypeRequiredDescription
onClick(methods: UseFormReturn<FieldValues, any, undefined>) => voidyesCalled when the user clicks the button. Receives the methods of the form, for example getValues, setValue and trigger.
iconIconPropyesThe Font Awesome icon on the button. Write the name, for example 'trash', or the style and the name, for example ['fal', 'trash']. See Icons.

Select from table

type: 'select-from-table' has its own configuration in App Engine scripts. It is described in Form configuration in AppEngine. The columns of its table are defined as in Table column, filter and sort reference for App Engine.

Icons

In a script you can use every Font Awesome icon by its name. They are available without an import. A plain name such as 'user' uses the solid style. To choose another style, write the style and the name as an array:

StyleNotation
Solid['fas', 'user']
Regular['far', 'user']
Light['fal', 'user']
Duotone['fad', 'user']
Brands['fab', 'github']

Both notations work wherever a field takes an icon, also in select-from-table fields since version 17.2.

Conditions

A condition changes a field while the user fills in the form. You name the fields to watch and return the new state from a function.

PropertyTypeRequiredDescription
type'disabled' | 'hidden' | 'showRequiredAsterisk' | 'options'yesWhat the condition controls: whether the field is inactive, whether it is hidden, whether it shows the asterisk, or which options a select field offers.
watchedValuesstring[]noThe names of the fields whose values are passed to the function. The condition is evaluated again whenever one of them changes.
custom(values: any[]) => booleanyesReceives the watched values in the order of watchedValues. Returns true or false for the first three types. For options it returns the array of options.

A field can have one condition or an array of conditions.

{
	name: 'reason',
	type: 'textarea',
	label: 'Reason',
	condition: {
		type: 'hidden',
		watchedValues: ['status'],
		custom: ([status]) => status !== 'rejected'
	}
}

The field reason is hidden unless status is rejected.

Validation rules

Each entry of validation is an object with one or more rules and an optional message. If you do not pass your own validationSchema to the form, the rules of all fields are turned into one.

validation: [
	{ required: true, message: 'Enter a name.' },
	{ max: 128 }
]

Rules for every type of value:

RuleTypeMeaning
requiredbooleanThe field must have a value.
notRequiredbooleanThe field may stay empty.
nullablebooleannull is accepted as a value.
nonNullablebooleannull is not accepted.
oneOfT[]The value must be one of the listed values.
notOneOfT[]The value must not be one of the listed values.
when{ keys, is, then, otherwise }Applies further rules depending on the value of other fields. keys names the fields, is is the value or a test function, then and otherwise receive the schema and return the changed schema.
test{ name, message, test }A check of your own. test receives the value and returns true if it is valid. It may return a promise.
transform(value, originalValue, schema) => anyChanges the value before it is validated.

Additional rules by type of value:

ForRuleTypeMeaning
Textmin, max, lengthnumberThe smallest, largest or exact number of characters.
TextmatchesstringA regular expression the text must match.
Textemail, url, uuid, datetimebooleanThe text must be an e-mail address, a URL, a UUID or a date and time in ISO notation.
Texttrim, lowercase, uppercasebooleanRemoves surrounding spaces or converts the text to lower or upper case.
Numbermin, maxnumberThe smallest and largest value, both included.
NumberlessThan, moreThannumberThe value must be below or above the given number.
Numberpositive, negative, integerbooleanThe value must be positive, negative or a whole number.
NumbertruncatebooleanCuts off the decimal places.
Numberround'floor' | 'ceil' | 'round' | 'trunc'Rounds the value in the given way.
Datemin, maxDate | stringThe earliest and latest date.
List of valuesmin, max, lengthnumberThe smallest, largest or exact number of selected values.
Yes / noisTrue, isFalsebooleanThe value must be true or must be false.

Sections

The fields of a form are grouped in sections. config.sections is an array of these objects:

PropertyTypeRequiredDescription
fieldsField[]yesThe fields of the section.
sectionstringnoThe title of the section.
showRequiredAsteriskbooleannoShows an asterisk next to the title. Visual only.
headerFieldFieldnoA field shown next to the title.
sxSxPropsnoCustom styles for the section.

The spacing, elevation and background of sections and of the whole form are set in ui. See Form and Table UI configuration for App Engine.

Updated on Dec 1, 2026