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) »
  • Thank You Template on contribution
Pages: [1]

Author Topic: Thank You Template on contribution  (Read 383 times)

aspagarino

  • I post occasionally
  • **
  • Posts: 89
  • Karma: 10
  • San Diego Joomla
    • California Center for Sustainable Energy
  • CiviCRM version: CiviCRM 4.3
  • CMS version: Drupal 7
Thank You Template on contribution
September 12, 2012, 05:34:21 pm
I am trying to add some logic on ThankYou.tpl

I am not sure why I cannot read the postal code field from smarty  ???

The smarty debug console for the page is showing the value for the postal
Code: [Select]
postal_code-Primary => Array (9)
  name => "postal_code-Primary"
  value => "92117"
  type => "text"
  frozen => true
  required => false
  error => null
  id => "postal_code-Primary"
  label => "<label for="postal_code-Primary">Zip ..."
  html => "92117<input type="hidden" name="posta...


But if I insert {$form.postal_code-Primary.value} on the template it shows a value of 0.

What I am missing to get the value? Thanks for the help...
Andres

Open Source is Green

aspagarino

  • I post occasionally
  • **
  • Posts: 89
  • Karma: 10
  • San Diego Joomla
    • California Center for Sustainable Energy
  • CiviCRM version: CiviCRM 4.3
  • CMS version: Drupal 7
Re: Thank You Template on contribution
September 17, 2012, 02:23:29 pm
Found the answer here:
http://forum.civicrm.org/index.php?topic=3265.0

For certain fields like phone, zip, address we need to assign first a variable and then apply the value rather than use the smarty value. For postal code primary use

Code: [Select]
{assign var=n value=postal_code-Primary}
{$form.$n.value}

Thanks to rs3515
Andres

Open Source is Green

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Thank You Template on contribution

This forum was archived on 2017-11-26.