API: Form Containers
Form
Class Signature
Properties
| Property | Type | Default | Description |
|---|---|---|---|
formId | String | -- | Unique identifier |
title | String? | -- | Form title |
description | String? | -- | Form description |
hSpacing | double | -- | Horizontal grid spacing |
vSpacing | double | -- | Vertical grid spacing |
items | List<ContentItem> | -- | Fields, sections, repeating sections |
formGroup | FormGroup | -- | reactive_forms FormGroup |
valid | Observable<bool> | -- | MobX-reactive validity |
Methods
currentValuesMap<String, dynamic> currentValuesCurrent field values
savedValuesMap<String, dynamic> savedValuesAlias for currentValues
getFieldValuedynamic getFieldValue(String name)Single field value
setFieldValuevoid setFieldValue(String name, dynamic value)Set single field
patchValuesvoid patchValues(Map<String, dynamic> values)Patch multiple fields
validatebool validate({bool focusOnInvalid})Mark touched, check validity
saveAndValidatebool saveAndValidate({bool focusOnInvalid})Alias for validate
isValidbool isValidSynchronous validity check
resetFormvoid resetForm()Reset to initial values
isDirtybool isDirtyAny field modified
isTouchedbool isTouchedAny field interacted with
validateAllAsyncFuture<bool> validateAllAsync()Run all async validations
getAllErrorsMap<String, String> getAllErrors()All validation errors
getAsyncErrorsMap<String, String?> getAsyncErrors()Async validation errors
collectSoftBreachesList<SoftBreachDetails> collectSoftBreaches()Soft validation warnings
hasSoftValidationsbool hasSoftValidationsAny soft validation configured
addListenervoid addListener(VoidCallback)Value change listener
removeListenervoid removeListener(VoidCallback)Remove listener
addDerivationsvoid addDerivations(List<FieldDerivation>)Register field derivations
disposevoid dispose()Clean up subscriptions
Schema: vyuh.form
Top-level form container that creates and owns a FormGroup.
FormDescriptor
Class Signature
Registration descriptor used to declare validations, conditions, actions, and layouts available to a Form.
FormSection
Class Signature
Schema: vyuh.form.section
Visual grouping container. Not a form field -- creates no control.
RepeatingSection
Class Signature
Methods
canAddInstancebool canAddInstanceWhether more instances can be added
namespacedFieldNameString namespacedFieldName(int index, String fieldName)Generate name.index.fieldName
Schema: vyuh.form.repeating_section
Dynamic array of field groups using FormArray.
Enums
enum RepeatDisplayMode { accordion, expanded }StepForm
Class Signature
Schema: vyuh.stepForm
Multi-step wizard where each step is a Form.
Enums
enum ProgressTrackingType { none, all, required }StepFormDescriptor
Class Signature
Registration descriptor for StepForm, declaring layouts and controllers.
Next Steps
- Fields -- All 12 field types
- Validations -- Validation types
- Rules -- Conditions and actions