1 Definition

It is possible to create a form whose purpose is to request default values to be used in other forms. This is very useful, for example, when validating RF users with their passwords.

This form is invoked from the program execution using the parameter:

Copy
-config CONFIGFORM

In this case, CONFIGFORM is the name of the form that is used to define the default values.

The values reported in the fields of this form are stored in global variables with the same name as the fields.


Important

Axional Terminal R2020 does not implement a pre-established user authentication system. It is the program execution that allows the implementation of an authentication system.

2 Application

Starts by defining a form, as seen in the previous section: Forms.

In this case, by way of explication, a form called loginsetup will be created. The name and description of the form is provided, and it is not necessary to enter information in the Initial JS code or in the Form server rollback.



In the Form fields tab, the fields that the default form will have must be entered. Remember that the value informed in field_name will be the name taken by the global variable, and therefore it will be the one used in the following RF forms.

In this case it is also not necessary to enter any code in Field Before Client Code, Field Before Server Code, Field After Client Code and Field After Server Code.



At the start of program execution, the -config parameter is reported with the name of the default form.



As expected, the form with the default values that are stored in the global variables is displayed, and the user must enter the information before transacting with another form.



The values reported in the form will be part of the global variables. As the user enters other forms, the global variables that have been defined there can be added, as seen in the debug screen.