Output clickable link with mailto: from text input?
Permalink Browser Info Environment
Hi Jordan,
I'm wondering if there is a way to have a text field that receives an email address as plain text show up in the finished block as a clickable link that displays the email address and when clicked has the mailto: link behind it?
I have this:
but I can't seem to get it spit out the format I want. I tried swapping it with URL portion of the block builder but it didn't work for me. I'm hoping to avoid rebuilding from scratch, so I thought I'd check in with your first.
Thanks in advance!
I'm wondering if there is a way to have a text field that receives an email address as plain text show up in the finished block as a clickable link that displays the email address and when clicked has the mailto: link behind it?
I have this:
<?php echo htmlentities($field_11_textbox_text, ENT_QUOTES, APP_CHARSET); ?> <a href="<?php echo $link_url; ?>" target="_blank"><?php echo $link_text; ?></a> </br> <?php endif; ?>
but I can't seem to get it spit out the format I want. I tried swapping it with URL portion of the block builder but it didn't work for me. I'm hoping to avoid rebuilding from scratch, so I thought I'd check in with your first.
Thanks in advance!
Type: | Discussion |
---|---|
Status: | In Progress |
Sure, all you have to do is put "mailto:" in front of the email address in the href of the link. For example:
Wow. I was way over-thinking this. I also had failed to update the variable name properly. Everything is working great now. Thanks Jordan!