As in a previous (unanswered) question, I'm trying to add an image with an anchor for each address in the contact form.

In my extension, through the buildForm hook I'm able to add (once) an image in the contact form, but not to add n images in each address section.

enter image description here

Thank's for your answer.

  • A screenshot with annotations would help explain what you're wanting to do.
    – Aidan
    Dec 2 '16 at 8:19

In general, tweaks to CiviCRM templates are not super simple and usually require a 2-step process:

  1. Add a tpl.extra template with the same name as the template you wish to modify.
  2. Add a <script> tag and some javascript to your new template which uses jQuery to place the markup in the spot you want.
  • I've already thought about the solution you suggest. Bur what about if someone, with the need to change the contact form, overwrite the same template?
    – marcello
    Dec 7 '16 at 7:52
  • Sorry I assumed you were doing this for an in-house tweak not for a public extension. .tpl.extra files are fine for in-house and bespoke work. For a public extension use CRM_Core_Region
    – Coleman
    Dec 7 '16 at 15:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.