SensitiveFieldMasker
Overview
The Sensitive Field Masker widget provides a secure and user-friendly way to handle sensitive information in Mendix applications. It masks confidential input, such as identification numbers, account numbers, or credentials, while safely retaining the original value for backend processing.
Built to align with Mendix platform standards, this widget integrates seamlessly with system properties like Label, Visibility, and Editability, ensuring consistent behavior across pages and form elements. Its flexible masking rules allow developers to configure exactly how much of the input should remain visible to users, supporting a wide range of compliance and data protection requirements.
Whether you're designing secure onboarding forms, financial applications, or internal tools that handle confidential data, the Sensitive Field Masker helps minimize data exposure while improving user confidence and privacy.
Documentation
The Sensitive Field Masker widget is designed for applications that handle confidential or regulated user data. Typical scenarios include:
- Form fields that require masking of Aadhaar numbers, PAN numbers, employee codes, bank account numbers, mobile numbers, or login credentials.
- Preventing sensitive data exposure in shared screens, screen recordings, or UI walkthroughs.
- Allowing users to input values securely while ensuring backend processes access the original unmasked value.
- Enforcing partial visibility rules (e.g., showing first 2 digits and last 2 digits while masking the rest).
- Secure data entry in HR, finance, onboarding, utility, and customer-service Mendix applications.
This widget ensures that only safe, masked representations appear in the UI while your microflows and database retain complete values.
Features
- Real-time input masking while preserving the original value.
- Custom masking rules (Mask After, Leave Last, and Mask Character).
- Supports masking of alphanumeric values.
- System Property Support:
- Auto-generated Label, Visibility, and Editability controls from Mendix Modeler.
- “Never” editability fully prevents user typing.
- OnLeave Action support — triggers microflows/nanoflows on value update.
- Automatically loads and masks stored values in edit and view pages.
- Seamlessly fits Mendix styling using native form-control classes.
Limitations
- Does not encrypt data. Masking is cosmetic, not cryptographic.
Important Note
If the Original Attribute is stored in an encrypted format and loaded directly into the widget without decrypting, the encrypted text will appear inside the textbox when editing begins.
Because the widget updates the original attribute on every keystroke, even a single Backspace will modify the encrypted string, resulting in a corrupted and unusable encrypted value.
To avoid data corruption:
- 🔐 Always decrypt the original attribute before displaying it in the widget
- ✍️ After the user finishes editing, re-encrypt the original value before saving it
Releases
New Features:
- Introduced a configurable sensitive data masking widget for Mendix Web applications.
- Ability to store original (unmasked) and masked values separately.
- Supports customizable masking rules:
- Mask After (number of visible characters at start)
- Leave Last (visible characters at end)
- Total Length restriction
- Mask Character selection
- Fully supports Mendix system properties:
- Label – Auto-rendered
- Visibility – Widget hides without unmounting
- Editability – Correct behavior for “Default” and “Never”
- OnChange event support (Microflow / Nanoflow / Action)
- Works consistently in:
- Create pages
- Edit pages
- View-only scenarios
- Supports alphanumeric input only (0-9, A-Z, a-z)
- Automatically loads previously saved masked and original values on page load.
Enhancements:
- Improved internal state syncing between masked/unmasked attributes.
- Added internal validation to prevent user input when the widget is read-only.
- Supports backward compatibility with existing Mendix forms.
Fixes:
- Corrected behavior for masking when length < maskAfter + leaveLast.
- Fixed issues where masked value was not displayed during edit mode.
- Resolved inconsistencies with onChange triggers.
Compatibility:
- Designed and tested for Mendix 10.24.2+