Field properties
Each field type that you add to a form has field properties. After you have added a field to a form, you can specify the properties of the field.
The following describes the default properties that may be associated with different Field Types.
| Property name | Property description |
|---|---|
| Box size | For a single-select or multi-select box field, this property determines how many lines of values are displayed. |
| Columns | For a radio button list, this property determines how many columns radio button values are displayed in. This property can be used in conjunction with the Layout property to determine the way in which radio buttons are displayed. |
| Category Link | For a single-select field (radio buttons, drop-down list, single-select box) and for a multi-select field (checkboxes, multi-select box), you can pick an SDL Tridion Category to create a list containing all the Keywords in that Category, instead of specifying options yourself by hand (Items property). |
| Default value | The default value of the field. |
| Field inclusion | In a Summary field, this property determines how WebForms Designer interprets the list of fields listed in Field reference:
|
| Field reference | For a Summary field, a property that lists one of the following:
|
| File size limit | In an upload file field, this property allows you to specify the size of the file that a visitor can upload when filling in the form. You can specify two values for this property:
|
| Hint text | A hint for the field that will help the visitor to fill in the field correctly. You can enter this value in the Properties pane, or directly in the Design View of the form. You can also include or link to an SDL Tridion Component: see the property "Linked hint text". If both the "Hint text" and "Linked hint text" properties are filled in, "Linked hint text" is ignored. |
| Image | For an image field, the Image properties specify the following values:
|
| Items | Explained below. |
| Label | A label for the field that identifies the type of value that the visitor should fill in. You can enter this value in the Properties pane, or directly in the Design View of the form. |
| Layout | For radio buttons, this property determines if the radio buttons are displayed horizontally or vertically. This property can be used in conjunction with the Column property to determine the way in which radio buttons are displayed. |
| Linked hint text | Explained below. |
| Linked label | Explained below. |
| Maximum Length | Used to denote the maximum number of characters allowed in a field. |
| Maximum relative value | In a date field, this property allows you to set the latest date that a visitor can enter relative to the current date. In this case, the current date is the date on the server the presents the visitor with the form. You set two values for this property:
For example, if you are creating a reservation form, you may want to ensure that the visitor cannot enter a value that is more than two months away from the day that they are viewing the form. In this case you would set date_Type to the value 'month', and date_Number to the value '2'. In other words, the visitor cannot enter a date value that is after two months from today. |
| Maximum value | In, for example, a number field, the Maximum value denotes the highest value that a visitor can enter into this field. For a date field, this value denotes the latest date that a visitor can enter into this field. |
| Minimum length | Used to denote the minimum number of characters allowed in a field. |
| Minimum relative value | In a date field, this property allows you to set the earliest date that a visitor can enter relative to the current date. In this case, the current date is the date on the server the presents the visitor with the form. You set two values for this property:
For example, if you are creating a reservation form, you may want to ensure that the visitor cannot enter a value that is earlier than the day on which they are viewing the form. In this case you would set date_Type to the value 'day', and date_Number to the value '0'. In other words, the visitor cannot enter a date value that is prior to today. |
| Minimum value | In a number field, for example, the Minimum value denotes the lowest value that a visitor can enter into this field. For a date field, this value denotes the earliest date that a visitor can enter into this field. |
| Mutliple values | In an input select field, this allows you to specify if the visitor can enter multiple values for this field. |
| Number Type | For Number fields, you can select one of the following number types:
|
| Relevance condition | Explained below. |
| Required | This property identifies whether a field is mandatory or not. If you select "true", the visitor must fill in the field before submitting the form. If you select "false", the visitor can leave the field empty. |
| Text | The text that is displayed for a read-only form text field. |
| Unique ID | This property identifies a field. Each field on a form must have a unique ID. |
| Height (Rows) and Width (Columns) | These properties determine how many characters wide and how many character high the field is. |
The following Field properties require a more elaborate description:
- Items
-
To enter values into the Items property, do one of the following:
- Click the "+" symbol to expand the field and enter the property values as you would for other fields.
Click the button with three dots next to the field and enter values into the pop-up that opens. You can perform the following actions from this popup:
- Add values
-
To add an item select the bottom row (marked with a
*) and type the values in the fields. - Edit values
- To edit a value, replace the existing Value or Labels
- Change the order of list items
- To change the order of the items in the list, drag and drop the row header or a list item (the gray cell to the left of the row data) to a new position.
- Delete values
- To delete a value, delete the data entered in the Value and Label row.
- Linked hint text, Linked label
-
A linked hint text or a linked label allows you to link the hint text or label of a field, respectively, to an existing Component. You can specify the following properties for a linked hint text or label:
- Component Link
-
The URI of a Component that contains the text of the hint or label. By default, the Component to which you link must be based on the
ComponentLinkTextSchema; however, your WebForms application administrator may have configured a different Schema for these Components. - Render Type
-
- Render Inline renders the selected Component within the form
- Render as a Link renders the selected Component as a link
- Link Text
- The text of the link that you create if you choose Render as a Link.
- Link Following Behavior
-
If you selected Render as a Link, you can define what happens when a visitor clicks the link. You can select from one of the following options:
- New Window
- Same Window
- Unresolved Link Text
- The text that appears if the link cannot be resolved. This text appears if you selected Render as a Link, and the Component Link refers to a Component that does not exist on the Presentation Server.
- Relevance condition
-
You can apply a relevance condition to compare the contents of a field against a value or a regular expression. If the comparison evaluates to 'true', the field is displayed; if it evaluates to 'false', the field is not displayed. Note that you cannot use this property to compare dates.
The Relevance Condition Property can be used to specify:
- Field
- the Unique ID of the field that must contain or not contain the specified value
- Operator
-
One of the following comparison operators:
- Equal
- checks if Field is equal to Value
- Not Equal
- checks if Field is not equal to Value
- Smaller
- checks if Field is smaller than Value
- Smaller or Equal
- checks if Field is smaller than or equal to Value
- Greater
- checks if Field is greater than Value
- Greater or Equal
- checks if Field is greater than or equal to Value
- Matches
- checks if the string value in Field matches against the regular expression contained in Value. The syntax of the regular expression used is explained in Advanced properties.
- Contains
- checks if the string value in Value is present in the string value in Field. For example, if Field contains "czechoslovakia" and Value contains "oslo", the comparison using Contains will return as true.
- Value
-
The value to compare the field value against.
Here is an example of a Relevance condition: if you want to display a Customer Satisfaction field only if a visitor has selected Yes in answer to the question, "Are you an Existing Customer?" you could create the following relevance condition:
- Field
- Customer
- Operator
- Equal
- Value
- Yes
Also refer to Implementing Dynamic Drop-down fields for more information about Dynamic Drop-down field properties.