Form Class
Component used to create a Form using supplied properties to specify the fields of the Form.
example
// Example of using a form as contents of a modal dialog.
export class ExampleForm extends React.Component {
public static open() {
const form = new ExampleForm({});
UiFramework.dialogs.modal.openDialog(form.render());
}
protected async handleSubmit(values: FieldValues): Promise
protected async processFormSubmission(values: FieldValues): Promise
protected handleCancel() { UiFramework.dialogs.modal.closeDialog(); }
public render() { const fields: FieldDefinitions = { Name: { label: this._nameLabel, editor: "textbox", value: "John Smith", }, PickList: { label: this._pickListLabel, editor: "dropdown", value: "one", options: ["one", "two", "three", "four"], }, };
return (
Extends
- Component<FormProps, FormState>
Methods
Name | Description | |
---|---|---|
constructor(props: FormProps): Form | ||
render(): Element |
Defined in
Last Updated: 20 June, 2023