Page Under Construction - Introduction
Mandatory Fields using _field.valueIntroduction
Validation can be added to specific fields to check data as it is entered and before completing an Actionflow. Examples of validation include, checking if a field:
- has been completed
- contains certain numbers, letters or special characters
- is in a desired format, e.g. a website or email address
- and more...
Mandatory Fields
Go back to the Company Form and add a CSS property to the shared style, Mandatory Fields, which applies the - Open the Companies Form screen from the screen's home page. This ensures there is no data selected.Click .
- Ensure your screen is
Insert excerpt |
---|
| _unlock |
---|
| _unlock |
---|
nopanel | true |
---|
|
ed. - Double -click on the Company Name field to open its properties. Ensure your screen is unlocked.Add a Formatting Rule:
- Rule Expression,
_field.value == _NULL
- This expression will evaluate to true when this field is null.
Click its Insert excerpt |
---|
| _property_tabs |
---|
| _property_tabs |
---|
name | style |
---|
nopanel | true |
---|
|
- Click on the addIconaddIcon next to Style.
- We will create a style to highlight the field if the rule expression is true. Set the options how you feel are appropriate to highlight the field. Here is an example setup:
- Name,
Mandatory Fields
. - Text Colour field,
#d0021b
. - Font Weight field,
Bolder
. - Save your changes
- The style is added to the Formatting Rule.
- If there is an existing style to be used, this can be selected from the dropdown.
Save your changes.- In the Validation section:
Insert excerpt |
---|
| _check_box_tick |
---|
| _check_box_tick |
---|
nopanel | true |
---|
|
Mandatory and toggle it on Insert excerpt |
---|
| _toggle_on |
---|
| _toggle_on |
---|
nopanel | true |
---|
|
- your changes
- Close and reopen the Companies Form to ensure the new formatting rule is applied.Lock the
- the screen. Now the field label is red.
- Image Removed
- Notice when you move your mouse over the field the label changes colour. We will look at this in the next section.
Exercise
- has an asterisk.
- Image Added
Exercise
- On your Companies Form, click on the Company Name field header
- Note: You may need to click on it twice to ensure the
Insert excerpt |
---|
| _property_settings |
---|
| _property_settings |
---|
nopanel | true |
---|
|
that opens is for Static Text
- On the
Insert excerpt |
---|
| _property_tabs |
---|
| _property_tabs |
---|
name | style |
---|
nopanel | true |
---|
|
, add a CSS property, which applies a red text colour when the mouse moves over the Company Name
field.- header
- CSS Tag: color
- Value: red
Expand |
---|
|
Image Added Image Added |