cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Cris2
Helper II
Helper II

Change column of format type 'email' to text without hyperlink on portal

Hi

 

I have a column named email of Data type = 'Single line text'; Field type = 'Simple' and Format = 'Email'.

 

On the portal, when I am entering an email, I would like to:

1. Change the style to simple text without an underline.

2. Remove hyperlink, i.e. on single or double clicking on the email id, I do not want to open an email client.

 

Please let me know how can I achieve this using javascript and/or metadata on the portal management app.

 

Thanks

Cris

1 ACCEPTED SOLUTION

Accepted Solutions
hardikv
Memorable Member
Memorable Member

Hi @Cris2 

 

Please add below code to remove underline:

$(document).ready(function() { 
	$("#emailaddress1").attr("type","text");
	$("#emailaddress1").attr("onclick", null).off("click");
	$("#emailaddress1").attr("ondblclick", null).off("click");
	$("#emailaddress1").css("text-decoration", "none");
});

 

Glad to hear that your issue has been resolved. Please mark as answers so that it will be helpful to others.

View solution in original post

10 REPLIES 10
hardikv
Memorable Member
Memorable Member

Hi @Cris2 

 

Can you please post screenshot of your list and inspect element of email field?

 

As below:

Cris2_0-1632396079919.png

 

hardikv
Memorable Member
Memorable Member

Hi @Cris2 

 

It seems that email field is in FORM, not Entity List. Please confirm.

hardikv
Memorable Member
Memorable Member

Hi @Cris2 

 

Please add below code in JavaScript section in Basic Form:

$(document).ready(function() { 
	$("#emailaddress1").attr("type","text");
	$("#emailaddress1").attr("onclick", null).off("click");
	$("#emailaddress1").attr("ondblclick", null).off("click");
});

 

--------------------------
If you like this post, give a Thumbs up. Where it solved your query, Mark as a Solution so it can help other people!

Yes, you are right.

hardikv
Memorable Member
Memorable Member

Hi @Cris2 

 

Please add below code in JavaScript section in Basic Form:

$(document).ready(function() { 
	$("#emailaddress1").attr("type","text");
	$("#emailaddress1").attr("onclick", null).off("click");
	$("#emailaddress1").attr("ondblclick", null).off("click");
});

 

--------------------------
If you like this post, give a Thumbs up. Where it solved your query, Mark as a Solution so it can help other people!

Thanks. This has worked.

How could I remove the underline?

hardikv
Memorable Member
Memorable Member

Hi @Cris2 

 

Please add below code to remove underline:

$(document).ready(function() { 
	$("#emailaddress1").attr("type","text");
	$("#emailaddress1").attr("onclick", null).off("click");
	$("#emailaddress1").attr("ondblclick", null).off("click");
	$("#emailaddress1").css("text-decoration", "none");
});

 

Glad to hear that your issue has been resolved. Please mark as answers so that it will be helpful to others.

hardikv
Memorable Member
Memorable Member

Hi @Cris2 

 

Did that help to solve your issue?

If yes, can you mark as the answer so it helps other users?

If no, let me know.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (3,050)