Function: setFields()
function setFields(
page,
values,
formSelector?
): Promise<void>;
Defined in: core/forms.ts:75
Sets fields by their form name: text inputs and textareas (through TinyMCE when it edits them),
selects (several values for a multiple one), checkboxes and radios, in the order given (a field can
enable the next one). Throws FormError naming the fields the form doesn't have, and those it has
disabled: Moodle wouldn't send them, and the change would be lost unnoticed.
Parameters
| Parameter | Type | Default value |
|---|---|---|
page | Page | undefined |
values | Record<string, FieldValue> | undefined |
formSelector | string | "form.mform" |
Returns
Promise<void>