How should {$form.source_contact_id.html}
from \civicrm\templates\CRM\Activity\Form\Activity.tpl be altered so only text remains/ without an URL? smarty escape doesn't seems to be a good idea, neither crmReplace (which can replace link attributes like class or href, but doesn't seems to be able to remove link entirely). Any advice, please!
How about:
{$form.source_contact_id.html|strip_tags:"<a>"}
You'll have to add some conditional statements so the smarty only runs when your are viewing the Activity, if you don't the Contact Reference field in edit/create mode will break.
-
Brilliant Andrei, thank you! Didn't realize Smarty can strip tags selectively. AS for conditional statement(s): there are a plenty of $actions eq 1/2/3/4.. inside templates, so it looks easy and logical, apart from the fact I can't find a full list of $actions, so, for example, 4 in $actions stands for VIEW, but 8 stands for VIEW too; there are also mysterious ** $action eq 16384 ** where 16384 is ..? Worrying if you, by any chance, could shed some light on? Thanks anyway for genius Smarty hint! – yurg Apr 12 '16 at 10:16
-
21 = Add, 2 = Edit, 4 = View, 8 = Delete having a look at
/CRM/Core/Action.php
on line 46: github.com/civicrm/civicrm-core/blob/… you can see, among the rest of the actions, that 16384 stands for Copy – Andrei Apr 12 '16 at 10:37