Overview
FormMetadata encapsulates all information needed to render a form. This class is instantiated by the client when it receives metadata from the server.
Class Signature
Properties
Unique identifier of the form to which this metadata belongs.
Human-readable label for this form, typically displayed in the UI.
Array of input field metadata objects that define the form’s input controls.
Array of output field metadata objects that define the form’s output controls.
Indicates whether the form should be automatically posted as soon as it has been loaded by the client. This is useful for displaying reports and showing data without requiring user interaction.
Indicates whether the initial post (when
postOnLoad is true) should validate all input fields before posting.Additional parameters for the client that can be used to pass custom configuration or data to form renderers.
Array of event handlers attached to this form.
Methods
getCustomProperty
Retrieves the value of a custom property by name.name- The name of the custom property to retrieve
null if the property is undefined.
Usage Example
How Clients Use This Class
Clients typically useFormMetadata in the following workflow:
- Receive metadata - The server sends form metadata as JSON
- Instantiate - Create a
FormMetadatainstance from the JSON - Render form - Use the
inputFieldsandoutputFieldsto render the appropriate UI controls - Configure behavior - Use
postOnLoadand other properties to control form behavior - Access custom data - Use
getCustomProperty()to retrieve custom configuration