Developer forum

Forum » Templates » Conceal input field in mail

Conceal input field in mail

Marc Hjorth
Marc Hjorth
Reply

I'm creating a form with forms for editors and a custom template and I want to conceal or hide a part of the userinput in the email receipt.

Say I'm letting the user enter a phone number, and only want the first 6 numbers shown in a mail like this: 1234 56**. Dots can be replaced with whatever, or just nothing at all.

Is this possible?

<input type="tel" id="phone" name="phone" />

<input type="submit" id="send" name="send" value="send" />

Replies

 
Nicolai Pedersen
Reply
This post has been marked as an answer

Something like this?:

string phoneNumber = "get value with a template tag...";
if(phoneNumber.length>2){
    string phoneNumberConcealed = phoneNumber.Remove(str.Length -2) + "**";
}
Votes for this answer: 1

 

You must be logged in to post in the forum