Datagrid remove auto mailto-link to email field

johnnorrby

New member
Hi!

I wish to create my own datagrid template there email doesn't automatically gets a link with mailto.

My intended use is to create my own mailto-link with ?Subject=The subject&body=Information from database.

Right now dadabik_field email dadabik_field generates an link with the email. I only want to display the emailadress.

How do I do that?

Thank you!


__________________________


Your current DaDaBIK version
You are using DaDaBIK version 10.5-Manarola enterprise, installed on 01-18-2021 (installation code: 1649460057ff199ea4), the latest version of DaDaBIK is 10.5-Manarola released on 01-14-2021

You are runnning the latest release of DaDaBIK

In case you want to upgrade to a more powerful edition (from Pro to Enterprise/Platinum, from Enteprise to Platinum) please contact us.

System info
PHP Version: 7.2.34

mysql version: 5.5.52-MariaDB-cll-lve

Web server: Apache

Client: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36
 

eugenio

Administrator
Staff member
Hello,
it's because the field type is email, you can override this behaviour with your own custom formatting function if you want.

Best,
 

johnnorrby

New member
Hi!

Thank you for your quick reply!

Can you point me in the right direction?

I also tried to rename the column in database to something else so it should not behave as an link with no success.

Thank you!
 

eugenio

Administrator
Staff member
If you check "Custom formatting functions" in the documentation there is everything you need.
You don't need to rename the column in the database.

Best,
 

johnnorrby

New member
Thank you!

I have now entered this function in include / custom_functions/custom_formatting_functions.php

<?php

function dadabik_format_email ($value, $id){
return ''.$value.'';
}

?>


It seems not to work in my datagrid template view, even if I remove the $value it's still the same email with link displaying.
The column name is "email".

What am I doing wrong?

Thank you.
 

eugenio

Administrator
Staff member
Hello,
It should work, if it is not working, I think the only reason could be that in form configurator you did not select the formatting function you thing you did.

Best,
 

miktham

New member
Thank you!

I have now entered this function in include / custom_functions/custom_formatting_functions.php

<?php

function dadabik_format_email ($value, $id){
return ''.$value.'';
}

?>


It seems not to work in my datagrid template view, even if I remove the $value it's still the same email with link displaying.
The column name is "email".

What am I doing wrong?

Thank you.
Hi

Your issue got solved?
 
Top