In this article, we will learn how to enable the "Hide/Show" feature that is available within the "Security -> Settings" option, for the "Retrieve Password" field that is found on the login screen that was generated with HTML template.
Currently, this feature is automatically enabled when the security module is generated without using a custom HTML template for the Login screen. However, so that we can enable it in our login screen that has an HTML template, we must add two JavaScript functions inside our template's index file.
Below, let's see the procedures performed in each topic:
Enabling the field inside the HTML template index file
If the field is not enabled in your template, we need to follow the step by step below:
1 - Within the Login application in your ScriptCase, more precisely in "User's HTML", we click on the Check button to verify the fields that are not included in the HTML template file located in the external libraries. The expected result should be as shown in the images below:
Another point before finishing is related to the "id" of the field that is passed as a parameter inside the conditionals in the functions.
This "id" must conform to what is referenced in the template's HTML code, and so that we can capture this information, we can inspect the element with the Login application running, and identify which "id" represents the field "retrieve_pswd" to replace what is found in the above script.
As you can see in the image below, on the right is the HTML code of the template, but highlighted is the "Retrieve Password".
The information that interests us is inside the "div" tag that is above the highlighted code, which is precisely the "id-retrieve_pwsd-1". Just replace the script's "id" with the "id" that appears in your HTML template.

In the example script above, this id is already included in the conditional, because it is the example template from ScriptCase's sample library.
Once that is done, just save and run the application again, and access the account to enter the "Security -> Settings" option, and enable or disable the "Retrieve Password" field to be shown or not on the Login screen.