Using maito: in email link

Discuss MySQL Ajax Table Editor Pro Version

Using maito: in email link

Postby netvoy » Sat Dec 13, 2014 2:06 pm

Need help coding the following
);
$tableColumns['email'] = array(
'display_text' => 'Email',
'perms' => 'EVCTAXQSHOF'


Unable to incorporate the <mailto:['email']> successfully into the php code. If there are any suggestions to help me do this it would be appreciated.
Ron
netvoy
 
Posts: 3
Joined: Sat Nov 15, 2014 5:59 pm

Re: Using maito: in email link

Postby mukeshdak » Tue Mar 20, 2018 2:06 am

You have to use following.
Code: Select all
function initiateEditor()
{
          $tableColumns['email'] = array(
               'display_text' => 'Email',
               'perms' => 'EVCAXTQSFHO',
               'table_fun' => array(&$this,'formatEmail'),
               'view_fun' => array(&$this,'formatEmail')
          );
     ...
}

function formatEmail($col,$val,$row,$instanceName,$rowNum)
{
     $html = '';
     if(strlen($val) > 0)
     {
          $html = '<a target="_blank" href="mailto:'.$val.'">'.$val.'</a>';
     }
     return $html;
}
mukeshdak
 
Posts: 30
Joined: Fri May 11, 2012 3:18 pm


Return to Pro Version

Who is online

Users browsing this forum: No registered users and 6 guests

cron