Start a conversation

Using masks in Data Entry

This example will be developed using a form of customized input masks and routine social security number validation using ajax.

Creating a new form

1. Create a new application of the standard form (simple) based on the Employees table.

2. In the application menu click the Positioning of Fields item.

3. Choose the fields: EmployeeID, FirstName, Title, BirthDate, SSN e HomePhone.

Assigning Mascara input to SSN and HomePhone field

4. In the application menu open the folder fields and click on the SSN field.

5. On the property Mask Display add the following mask: # # # - # # - # # # #

6. In the application menu folder still in the fields click on the HomePhone field.

. In Property Grid Mask add the following mask: (# # #) # # # - # # # #, # # # - # # # #

You can use the semicolon to insert two masks for a field.
8.In the application menu open the folder and click the Layout Blocks item.

9.Change the Label property for Add / Edit Employees, enable the Display Label property and change the Label Position property for Above.

Creating a method for validation of Social Security Number

10. In the application menu to access the Programming Libraries folder and click the item.

11. Open the tab editing ScriptCase Libraries and enable the library sc_ssn.php

12. Inside the folder Programming Methods to access the folder and click the New Item Method

13. In the Name property ValidateSSN report and click the Create button.
14. Enter the code shown in the image below:

Creating an Ajax event for the SSN field

15. In the application menu go to Ajax Events folder and click the New Item Ajax Event.

16. Configure the event according to the image below.

17. Enter the area code of the event the following line:

Choose files or drag and drop files
Was this article helpful?
  1. Amanda Santos (Migrated deleted Agent)

  2. Posted
  3. Updated