K2 SmartForms: No validation message shown if control is set to borderless
KBS100121
PRODUCTIssue
When setting a validation on controls on a SmartForm, it will fail with a red border and error:
However, if the borderless setting is set to TRUE on the controls Properties, it will not show a red border or error message on validation.
Symptoms
This is a known issue on K2 4.7 and K2 Five.Resolution
There are 3 workarounds to consider:
Workaround #1:
On the validation dialog box, there is an option called βShow validation message in a popup dialogβ β this will show a warning message if the validation is not met.
More information can be found here: http://help.k2.com/onlinehelp/k2cloud/userguide/update_3/default.htm#create/k2designer/controls/controlvalidation.htm
Workaround #2:
- On the Form/View add an additional datalabel called: lblError.
- Set the label to invisible and the text color to Red.
- On the Form/View rules, on the validation add an "Else" condition, to show the label with an error message (e.g. "A value is required").
- Runtime:
Workaround #3:
Similar to Workaround #2
- With the control set to Borderless, set the border color to Red.
- On the Form/View rules, on the validation add an "Else" condition to show the border.
- Runtime: