Developer forum

Forum » Templates » Conceal input field in mail

Conceal input field in mail

Marc Hjorth
Marc Hjorth

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" />


Nicolai Pedersen
Nicolai Pedersen
This post has been marked as an answer

Something like this?:

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


You must be logged in to post in the forum