Form Fields
Introduction
Form Fieldis a configurable unit used to define fields displayed in forms for specific wizard steps, particularly those of theFORMtype.- A
Form Fieldshould be mapped to either aPublication Metadataor one of thepublication's properties(e.g., label, description). - It's possible to specify the type of the
Form Field. By default, the field will use the type of the corresponding property/metadata. Supported types include:- Single-line Text (
text) - Date (
date) - Combobox (
select): For this type, you can define a list of options called Selection or use a Plugin Method to fetch the options. - Bucket (
bucket)
- Single-line Text (
- Additionally, a
Form Fieldcan be configured with the following options:Required: The field is mandatory for the form, meaning the user must fill it out before submitting or saving.Disabled: The field is displayed on the form but cannot be edited.
Configuration
- All
Form Fieldsconfiguration can be maintained in the ISON configuration.
ISON Configuration Details
Sample
<formFields>
<formField id="property_form_field">
<propertyAttribute>identifier</propertyAttribute>
<label>property_form_field_label</label>
<required>true</required>
<disabled>true</disabled>
<dependencies>
<dependency>
<formFieldId>text_form_field</formFieldId>
</dependency>
</dependencies>
<validations>
<validation id="minLength" label="min_length">3</validation>
</validations>
</formField>
<formField id="text_form_field">
<metadata>text_metadata</metadata>
<label>text_form_field_label</label>
</formField>
<formField id="date_form_field">
<metadata>date_metadata</metadata>
<label>date_form_field_label</label>
<type>date</type>
</formField>
<formField id="select_form_field">
<metadata>text_metadata</metadata>
<label>select_form_field_label</label>
<type>select</type>
<selection>select_form_selection</selection>
</formField>
<formField id="select_method_form_field">
<metadata>method_text_metadata</metadata>
<label>select_method_form_label</label>
<type>select</type>
<multiValue>true</multiValue>
<selectionMethod>get_select_method_field_options</selectionMethod>
</formField>
<formField id="bucket_form_field">
<metadata>bucket_metadata</metadata>
<label>bucket_form_field_label</label>
<type>bucket</type>
</formField>
</formFields>
...
<selections>
<selection id="select_form_selection">
...
</selection>
</selections>
...
<methods>
<method id="get_select_method_field_options">
...
</method>
</methods>
Explanation
<formFields>: Wrapper element forForm Fieldsconfiguration.<formField>: Each<formField>element represents the configuration for a single form field.- Attributes:
id: The unique ID of theForm Field, which should match the ID configured in theWizard Step. This attribute is required.- Elements:
<propertyAttribute>: If theForm Fieldis mapped to aPublication Property, the key of the property should be specified here.<metadata>: If theForm Fieldis mapped to aPublication Metadata, the identifier of the metadata should be specified here.<label>: The label of theForm Field. Supports language-dependent translation. This element is required.<type>: The type ofForm Field. Available options aretext,date, andselect. If this element isn't specified, the type of the corresponding property/metadata will be used.<required>: Enable/disablerequiredfeature. Default value isfalseif not configured. For select-type form fields, if the field is not required (i.e., required = false), an empty option will be included as first option in the list of selectable values. This behavior is just applied for the list of value that comes from plugin method.<disabled>: Enable/disabledisabledfeature. Default value isfalseif not configured.<selection>: If theComboboxfield requires static options, define the ID of theSelectionhere.<selectionMethod>: If dynamic options are needed for theComboboxfield, define the plugin method to fetch the options here.<multiValue>: If the type of theForm Fieldis select and this flag istrue. It means user can select more than one option in the combobox. Default value isfalseif not configured.<dependencies>: The list of dependent fields<dependency>: Dependent field information<formFieldId>: ID of the form field that is dependent on
<validations>: Wrapper element forvalidationconfiguration.<validation>: The condition that will be applied to validate the input before it is saved to the server.id: identifier of validation type. Currently, there are 4 type supported:minLength,maxLength,pattern,required.label: The error message is displayed when the input value violates the validation condition. Supports language-dependent translation.
- Attributes: