It’s possible to have a password field in an spModal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2024 07:54 PM
Hi,
We have the requirement of encrypt the users’s input when they reject a request and write a justification in the spModal from Employee Center Approval page, it’s possible to encrypt this justification as a password field, not encrypted in the db, it’s more like when you are typing the comment in the spModal that it’s displayed when a user is rejecting the request.
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2024 09:45 PM
Hi @dgarnica
1. Customizing the spModal Instance
When you create or customize an spModal, specify the input field for the justification as a password field. This is not standard functionality for a justification input (which would typically be a text area), so you would need to customize this part.
spModal.open({
title: 'Reject Justification',
message: 'Please enter your justification for rejection:',
inputType: 'password', // Setting inputType to password to mask input
buttons: [
{label: 'Submit', value: true},
{label: 'Cancel', value: false}
],
callback: function(result) {
// Callback function to handle the submission
if (result) {
var justification = result; // result contains the masked/encrypted justification
// Proceed with any action after receiving the justification
}
}
});
Please Mark this Helpful and Accepted Solution. If this Helps you to understand. This will help both the community and me..
- Keep Learning
Thanks & Regards
Deepak Sharma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2024 08:34 AM
Hi Deepak,
I tried your script, but it doesn't let you write the justification:
If I set the "input" parameter to true, the textbox appears but is not encrypted:
Regards.