Application Load

IFormField

The physical TypeScript declaration from the Nuxt starter, with linked types and field comments.

IFormField

One request field: input type, validation and available choices.

app/interfaces/orionplace/appBase/IForm.ts
TypeScript
export interface IFormField {
  // Class describing this form field.
  form_class: string;
  // Display label for the input.
  label: string;
  // Whether the request must include this field.
  required: boolean;
  // Input control type supplied by the backend.
  input_type: string;
  // Input attributes and validation metadata.
  attrs: Record<string, JsonValue>;
  // Available option keys and display values.
  options?: { /* Option key submitted in the request. */ key: JsonValue; /* Display value of the option. */ value: JsonValue }[];
  // Nested form fields.
  sub_form?: IFormFields;
  // Optional field path in the submitted data.
  path?: string;
}