Field

The Field component controls the user experience of the currently selected field of instance data using the following components:

  • GI_Field
  • Any custom fields created by your development team
Field layout; the label is at the top, followed by any top description text you inputted, then any custom fields, then the field, with a bottom description text on the bottom

The Field component uses the Field Element (FieldUX) and FieldName to determine which FieldDefinition is required and this in turn indicates what type of field is being rendered. The FieldDefinition is used to determine whether there is any text to display in the Label, DescriptionTop and Description regions of the field user experience.

By default, the Field component will route all field rendering through a switch statement to the GI_Field component provided by trellispark. You can create and add your own CustomField to the UX-WASM-Component project. By adding extra case statements to the Field component switch statement, you can integrate your CustomField component into the overall FormBuilder.

The GI_Field or your CustomField component will take the MyInstance parameter, FieldDefinition and FieldUX as parameters to render the final field in the user experience.

To add a new CustomField into the FormBuilder, you will need to add a new subform definition to the Server Owner functionality data model. If you need to pass custom field configuration data into the CustomField component to control the rendering process, then you will need to add extra fields to the subform definition.

Updated on January 26, 2023

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Contact Support

Leave a Comment