Guideline 3.3 Input Assistance states that users should be assisted in the correction of mistakes and avoiding them.
If an input error is automatically detected, the item that is in error should be identified and the error should be described to the user in the text.
In GeneXus, you can use Transaction rules to show error and warning messages to the user.
The appearance of messages can be changed using the Messages Theme Class.
- ErrorMessages: All "error" rules are associated with this class
- WarningMessages: All "msg" rules are associated with this class
See Theme Editor Classes for more details.
In web panels, if you use a Business Component (BC) on the form, the BC's rules can be triggered when one of the CRUD methods of the BC is used.
&Messages = &customer.GetMessages()
for &Message in &Messages
In a web panel form, the IsValid Event for Web Applications can be used to capture any changes to the field which loses the focus. The Msg rule may be used to display any message on the form.
Submissions should be reversible. Besides, data entered by the user should be checked for input errors and the user should be provided an opportunity to correct them.
A mechanism should be available for reviewing, confirming, and correcting information before finalizing the submission.
All these operations can be managed by implementing the web forms for that purpose and using the CRUD operations of the Business Component.
Context-sensitive help should be available.
You can use the Context Sensitive User Interfaces.
For example, consider the following form where the &Address field has the NotifyContextChange property set to TRUE, and a Trackcontext event is programmed in order to capture the focus on that field and perform an action (show a message beside the field).
messageAddress.Visible = true
messageAddress.Caption = "Enter your address here"
messageAddress.Visible = false
messageName.Visible = false