Customize Form Behavior
At times, the appearance of a form depends on the data entered in specific fields or the user viewing/editing the form. Some fields may be unnecessary or required conditionally, based on the data entered or the user’s role.
TeamDesk allows you to control the behavior of form elements (columns, sections, texts) in the forms.
If you’ve created different form behavior criteria for the same field (column), and these criteria apply simultaneously, the field behavior is determined by the most dominant behavior option. The rating from most dominant to least dominant is as follows:
- Edit Form Behavior:
Hidden
>Readonly
>Required
>Editable
>Default
;- View Form Behavior:
Hidden
>Visible
>Default
.
To customize form behavior:
-
Click the
Setup
link in the top right corner of the window. -
Select the necessary table and click the corresponding table tab at the top of the window.
-
From the menu in the main frame, select "Forms" > "Customize form behavior."
By default, TeamDesk maintains its current behavior, displaying all form elements (columns, sections, texts) in the view mode and displaying editable elements only in the edit mode. You can configure the form differently.
Edit Form Behavior (On Edit
) includes the following options:
- Hidden.
- Readonly.
- Required.
- Editable.
View Form Behavior (On View
) allows you to choose among these options:
- Hidden.
- Visible.
Example 1: Additional Fields for Customers
Imagine you have the "Contacts" table that stores information on Customers and Prospects. When a prospect becomes a customer, the "Customer" value is set in the "Status" column, and two additional fields, "Customer Type" and "Contract Number," should appear on the form.
First, in the "Default" section, you should hide the "Customer Type" and "Contract Number" columns. Click on the "Behavior" button and set the "Hidden" option for both "On View" and "On Edit."
Save the changes.
Then click the "New Criteria" button to define a new criterion checking whether the "Status" is "Customer."
Once the criterion is created, you should make the columns visible/hidden under this criterion. Click on the "Behavior" button near the criterion and set the appropriate options for the required columns.
Let’s test what you have:
When you open an existing record where the prospect is registered, the "Status" column contains the "Open-Not Contacted" value.
Now, let’s change the status to "Customer." As a result, the "Customer Type" and "Contract Number" columns will appear on the form according to the adjusted form behavior.
Example 2: Sections Appearance
Different appearance options are available for sections on the form:
- Visible.
- Collapsed.
- Expanded.
- Hidden.
Please note that if a section is hidden or visible, all columns included in this section are hidden or visible automatically. If you’ve created different form behavior criteria for the same section, and these criteria apply simultaneously, the section’s behavior is determined by the most dominant behavior option.
The rating from most dominant to least dominant is as follows:
Hidden
>Expanded
>Collapsed
>Visible
>Default
.
If a section is hidden, all columns included in that section are hidden. For example, when the "Hidden" option is set for the "Information" section, only the "Status" and "Additional" sections are visible on the form.
If you choose the "Collapsed" option, a section will be displayed in a collapsed state, but a user can click on the arrow to expand it.
When you set the "Expanded" option, a section will be expanded on the form, but a user can click on the arrow to collapse it.
Example 3: Role-Dependent Conditions
For instance, if there is an "Approved" checkbox in the Task form, this checkbox should be editable only by users with the "Manager" role. Initially, hide this checkbox on the "Default" form:
Save the changes and click the "New Criteria" button to set a criterion to check whether the user has the "Manager" role.
Click on the "Behavior" button near the criterion to make the "Approved" checkbox editable for users with the "Manager" role.
Let’s test what you have:
If a user with the "Manager" role edits a record, the "Approved" checkbox column is editable on the form.