FormField Element
Each FormField element is the child of the FormFields or the UIFields element in the Data Form Spec. FormField elements in FormFields map to parameters in the implementations. FormField elements in UIFields are presentational.
A FormField element is metadata that describes how to represent a single field within a data form. Form fields represent input into the system and are used in a variety of features, not just data forms. For example form fields are found in data lists and search lists.
Each form field has a variety of attributes that change the overall function and appearance. A key attribute is FieldID. FieldID values are unique within a data form. FieldID matches up to the variable name for the stored procedure or function. In other words, FieldID="CONSTITUENTID"corresponds to the Transact-SQL parameter @CONSTITUENTID within the implementation’s stored procedure. Form fields defined within the FormFields tag are connected to the parameters defined within the implementation.
Within a SaveImplementation CREATE PROCEDURE statement:
.. @FIELD1 nvarchar(10) = '', ..
Within the corresponding FormMetadata element:
.. <common:FormField FieldID="FIELD1" Caption="Field 1" DataType="String" MaxLength="10" /> ..
When you define a FormField, you enter a value for the Caption attribute that the platform may render as the caption for the field when the form is displayed. For more information, see Caption Attribute.
FormField elements include a DataType attribute that indicates what can go in the field. Blackbaud Infinity validates form field values based on DataType and in some cases formats data entry within the user interface. For example, if you select SmallInt as the data type for a FormField and you enter the value ‘Dog’ into the user interface, the platform would return an error message. For more information, see DataType Attribute.
When rendered by the web shell, a form field may appear as a text field, drop-down, grid, etc. depending on the descriptor elements contained by the FormField element. For example a FormField element can contain a SearchList element that the platform renders as a search field with a button to open a search screen and possibly with auto-completion and a limitation of field values.
Other attributes and elements further define the behavior of the form field. For more information about FormField attributes, see FormField Attributes. For more information about FormField elements, see FormField Elements.