Edit Masks
In our applications we always need to add masks to some field on the form.
RadCORE brings an attribute to reduce this codification.
Let's take as an example "frmDEMO_FORMS".
- DATE
- PHONE
- ID
Observe the "HINT" property of each component mentioned above (respectively):
[mask:date]] : Applies mask to dates
[mask:phone]] : Apply mask for phone( Default Brazilian )
[[mask:99.99]] : Apply custom mask
There are other masks and of course there are differences between countries. You can study the content of the functions involved and create your own masks.
Mask Conditional on the contents of a field
In the register of clients we have an example of conditional masking in the field "edCnpjCpf".
Here in Brazil, we have 2 documents: CPF( for people ) and CNPJ( for companies ).
Open the "frmCadCLIENTS" and search for "dm_rc.rc_MaskAdjust". Study all the points where I applied the function to understand how to proceed for a similar need in your application.
Rendering the masks
By default, the function call "dm_rc.rc_ApplyEditMasks( Self );" is only in "frmDEMO_FORMS" and "frmBaseCRUD / frmBaseCRUDDetail".
If you need to validate other operations in other forms that don't inherit from "frmBaseCRUD" you just copy it to where you want.
Created with the Personal Edition of HelpNDoc: Produce electronic books easily