CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Location of contribution form template file
Pages: [1]

Author Topic: Location of contribution form template file  (Read 1317 times)

jimmyjam

  • I post occasionally
  • **
  • Posts: 87
  • Karma: 4
Location of contribution form template file
June 29, 2010, 07:11:49 pm
Greetings,

I need to modify an online contribution page. Specifically, I need to modify the label "Email Address" to say "Primary Contact Email Address".

http://screencast.com/t/ODI2M2Uy

Which template file do I modify? I looked at several under /templates/CRM/Contribute/Form, but can't find the right one.

Thanks,
James

xcf33

  • I post frequently
  • ***
  • Posts: 181
  • Karma: 7
  • CiviCRM version: 3.3.2
  • CMS version: Drupal 6.19/6.20
  • MySQL version: 5.x
  • PHP version: 5.2.6
Re: Location of contribution form template file
June 29, 2010, 07:59:32 pm
Believe it's in

CRM/Core/BillingBlock.tpl

You can always look at the template being invoked from the page or form rendered in CiviCRM, I might be wrong but I think it's in that one,

Look for

Code: [Select]
<tr>
    {assign var=n value=email-$bltID}
    <td class="label">{$form.$n.label}</td>
    <td>&nbsp;{$form.$n.html}
    {if $form.is_for_organization}&nbsp;&nbsp;&nbsp;{$form.is_for_organization.html}&nbsp;{$form.is_for_organization.label}{/if}
    </td>
</tr>

Hope it helps,


Cheers!

jimmyjam

  • I post occasionally
  • **
  • Posts: 87
  • Karma: 4
Re: Location of contribution form template file
June 29, 2010, 08:08:23 pm
I imagined the correct template would have a line of code similar to:

Code: [Select]
<td class="label">{ts}Email Address{/ts}</td>
But maybe I'm wrong.

What should I modify in CRM/Core/BillingBlock.tpl ?

Thanks,
James

xcf33

  • I post frequently
  • ***
  • Posts: 181
  • Karma: 7
  • CiviCRM version: 3.3.2
  • CMS version: Drupal 6.19/6.20
  • MySQL version: 5.x
  • PHP version: 5.2.6
Re: Location of contribution form template file
June 29, 2010, 08:14:07 pm
I didn't really dig that deep but it seems the BillingBlock.tpl is invoked in the main contribution page form,

It contains the billing information (first name, last name, credit card info, donation amount etc.)

What you need to change is from

Code: [Select]
<tr>
    {assign var=n value=email-$bltID}
    <td class="label">{$form.$n.label}</td>
    <td>&nbsp;{$form.$n.html}
    {if $form.is_for_organization}&nbsp;&nbsp;&nbsp;{$form.is_for_organization.html}&nbsp;{$form.is_for_organization.label}{/if}
    </td>
</tr>

to


Code: [Select]
<tr>
    {assign var=n value=email-$bltID}
    <td class="label">Primary Contact Email Address</td>
    <td>&nbsp;{$form.$n.html}
    {if $form.is_for_organization}&nbsp;&nbsp;&nbsp;{$form.is_for_organization.html}&nbsp;{$form.is_for_organization.label}{/if}
    </td>
</tr>

Hopefully it works :)


jimmyjam

  • I post occasionally
  • **
  • Posts: 87
  • Karma: 4
Re: Location of contribution form template file
June 29, 2010, 09:19:38 pm
hey, thanks for your help!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Location of contribution form template file

This forum was archived on 2017-11-26.