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) »
  • How do I add a phone number field to BillingBlock.tpl?
Pages: [1]

Author Topic: How do I add a phone number field to BillingBlock.tpl?  (Read 441 times)

TMAI

  • I post occasionally
  • **
  • Posts: 31
  • Karma: 0
  • CiviCRM version: 4.3 Beta5
  • CMS version: WordPress
  • MySQL version: 5.1
  • PHP version: 5.3.3
How do I add a phone number field to BillingBlock.tpl?
April 09, 2013, 09:02:50 am
Hi,

I need to add a phone field to the billing section, which will also later be saved as the contact's phone number.
I have modified the BillingBlock.tpl, as well as the Form.php (mapParams and _setPaymentFields). I can also grab the number out of the params with the processor. However, it does not save it together with the contact. Where does that happen?

Thanks.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: How do I add a phone number field to BillingBlock.tpl?
April 09, 2013, 02:10:36 pm

If you add a field, you also need to save it. Check the postProcess code which saves the field

in general might want to do the below via hooks / custom templates rather than modifying core files

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • How do I add a phone number field to BillingBlock.tpl?

This forum was archived on 2017-11-26.