Create a registration form
Esta página aún no está disponible en tu idioma.
XLS Padlock lets you customize the text that appears on the activation dialog box. The text supports basic HTML display so you can use HTML tags such as <B></B> and so on. Fields can also be created: this is the subject of this section.
Create the registration form fields
Section titled “Create the registration form fields”To create a registration form and define the different fields, open your project in XLS Padlock and navigate to the “Activation Keys / Online Activation” page. For a full description of the available field types and options, see the Registration Form Editor.

XLS Padlock shows a basic HTML editor and a preview of the dialog’s text.

Two specific buttons let you add custom fields if you want to ask end users for further information and have your application send the latter to your web server.
For instance, to create a text field, type:
Your Name:<br><CONTROL TYPE="EDIT" WIDTH="280" VALUE="" ID="name"><br>The CONTROL tag defines a field of EDIT type (text). You can define the WIDTH in pixels and especially its ID. This ID must be unique and this is the field name that will be sent back to the web application during activation.
How the Web application receives form data
Section titled “How the Web application receives form data”Suppose that you have created three fields: name, email and token:
Your Name:<br><CONTROL TYPE="EDIT" WIDTH="280" VALUE="" ID="name"><br>Your Email Address:<br><CONTROL TYPE="EDIT" WIDTH="280" VALUE="" ID="email"><br>Your Activation Token:<br><CONTROL TYPE="EDIT" WIDTH="280" VALUE="" ID="token"><br>
When the end user clicks Activate, the workbook EXE file sends the data of the form back to your web application. It performs an HTTP POST request and the web application will process the data.
The HTTP POST request is processed by the Main Controller of the web application, defined in the MainController.php file available in the inc/app/controllers subfolder (xlspadlock-onlineact / inc / app / controllers).
Near line 15, you can see several lines of code:
$action = $f3->get('REQUEST.action');$systid = $f3->get('REQUEST.systid');$apptitle = $f3->get('REQUEST.apptitle');$cod = $f3->get('REQUEST.cod');For instance, the application title of your compiled workbook is stored in the $apptitle local PHP variable.
If we come back to the three fields defined previously, you can easily retrieve their values thanks to these additional lines below that you would have to place in MainController.php, just after the code above:
$username = $f3->get('REQUEST.name');$email = $f3->get('REQUEST.email');$token = $f3->get('REQUEST.token');As you can see, each field defined in the registration form by its unique ID can be retrieved in the PHP code by the generic code:
$idvalue = $f3->get('REQUEST.ID');Validating, storing form data
Section titled “Validating, storing form data”The F3 framework that the activation kit uses comes with all the necessary tools to process and store form data.
For instance, you could determine whether a user has the right to activate your workbook based on the value of the token. Or store user data into a database (see https://fatfreeframework.com/3.9/databases).