Remove the mailto link on email field types in catalog variables.

JasonH5
Tera Contributor

I have an email type variable in a catalog item that requests the user to input an email address.  The trouble is that the default format of the email type field includes an envelope button on the right side which opens an email client like a 'sendTo' link.  

find_real_file.png

This link does not make sense for the context which is needed and I would like to remove this link/button/icon from the field on the service portal.  I could use a regular text field instead of the email type, but I like the email address input validation on the email type variable.  

Is there a simple way to remove or disable this button for this catalog item?

Thank you,

Jason

1 ACCEPTED SOLUTION
3 REPLIES 3

Sai Kumar B
Mega Sage
Mega Sage

@Jason 

Can you try the below code in onLoad client script

function onLoad() {
callThisFunction();
function callThisFunction() {
var refs = document.getElementsByTagName("a");
if (refs) {
for (var i=0; i < refs.length; i++) {
var ref = refs;
var inner = ref.innerHTML;
if (inner.indexOf("email.gifx") > 0){
ref.style.display = 'none';
}
}}}}

If the above code doesn't work then the only way is to create single-line text and apply custom validation to it using onChange client script.

JasonH5
Tera Contributor

Thanks Sai, 

Could you give me a quick example or link to how I would implement the validation on the text field?

 

@Jason 

Yes, You can refer to this link - Email Validation for single line text field (Email ID)