E-mail and Telephone buttons in projects.

Everything concerning the Wordpress/Joomla/Drupal plugins
Post Reply
User avatar
Hopki
Gnome
Posts: 12999
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi,
When using Go To URL calls such as mailto: then e-mail address in a button then this work ok but in WordPress due to paths and calls breaks.
This is also true of the tel: call to get the computer or phone to make a call.

The solution is to use javascript,
for the call button you would use a Mouse Click, Go To URL action with the URL being:

Code: Select all

javascript: document.location.href = "tel:+xxxxxxxxxxxx";
Set the target to _self
Of course, replace the xxx with the required telephone number.

For the e-mail, again Mouse Click, Go To URL, but this time it's:

Code: Select all

javascript: document.location.href = "mailto:xxxxxx@xxxxxx.com";
Set the target to _self

If you wanted the Subject and Body Text added to the e-mail you would use:

Code: Select all

javascript: document.location.href = "mailto:xxxxxxx@xxxxx.com?subject=Big%20News&body=Thnak you for your interest";
Of course, you can add whatever subject and body text you want.

This also works outside of WordPress so can be used in all projects.
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
Post Reply