Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics
thomas.diesenreiter

How can I format a column with an email adress with a mailto link?

Hi there,
we have a custom field with an email address. I want to output the mail address with both an clickable mailto link and the original value as well. Pseudocode:
<a href="mailto:$mailadress">$mailadress</a>

The problem is: I need to use the value of the cf twice to do this, and I haven’t figured it out. The only thing I was able to do is using the mailto link with a generic “E-Mail” Logo by using the before and after values, which results into this:
<a href="mailto:$mailadress">Mail Adress</a>

Any help appreciated!

4 years, 9 months ago
Stefan van den Dungen Gronovius
Developer

The following hook can help you with that.

https://www.admincolumns.com/documentation/filter-reference/ac-column-value/

Have a look at the second example on that page, that checks for a specific Custom field key and alters the value (in that case color). You can do something similar but wrap the value inside a link.

4 years, 9 months ago
thomas.diesenreiter

Thanks, that did the trick!

4 years, 9 months ago

You must be logged in to reply to this topic.