Hi,
I have this Gridview:
<?= GridView::widget([
'dataProvider' => $dataProvider,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
'client_firstname',
'client_lastname',
'client_telno',
'client_email:email',
You will notice the client_email:email line. That displays the emails as clickable href mailto links.
Now in another view I have this Gridview:
<?= GridView::widget([
'dataProvider' => $dataProvider,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
[
[
'attribute' => 'clients_id',
'label' => 'Client Email',
'value' => function($model)
{
$client = Clients::findOne($model->clients_id);
return $client->client_email;
},
],
As you can see I am building a custom column where I show the client email from a different model class.
How do I apply the same clickable href mailto email link in a case like this?
Thanks