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) »
  • Custom Thank You template not showing Phone fields
Pages: [1]

Author Topic: Custom Thank You template not showing Phone fields  (Read 924 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
Custom Thank You template not showing Phone fields
February 17, 2010, 07:27:23 pm
I created a custom Thank You page for one particular contribution.

I put the new ThankYou.tpl in the right folder and I am using some of the fields showed using the Smarty debug console.

I am able to display most fields from the Smarty Debug Console file except for the address and phone fields.

When I use: {$form.first_name.value} {$form.last_name.value} and even custom fields like {$form.custom_73.value} everything works fine.

But as soon as I try to enter {$form.phone-Primary-1.value} the form does not display any of them  ???, it stops working!

The address field {$form.street_address-Primary.value} does not crash the Thank you page as the phone field but it displays a "0"

Here is the smarty debug with the fields from the form section that I would like to use:

{$form}

Array (26)
frozen => true
javascript => ""
attributes => " action="http://localhost/Joomla/inde..."
requirednote => "<span style="font-size:80%; color:#ff..."
errors => Array (0)
hidden => "<input name="qfKey" type="hidden" val..."
first_name => Array (9)
name => "first_name"
value => "Andres"
type => "text"
frozen => true
required => false
error => null
id => "first_name"
label => "<label for="first_name">First Name</l..."
html => "Andres<input type="hidden" name="firs..."
middle_name => Array (9)
name => "middle_name"
value => ""
type => "text"
frozen => true
required => false
error => null
id => "middle_name"
label => "<label for="middle_name">Middle Name<..."
html => "&nbsp;<input type="hidden" name="midd..."
last_name => Array (9)
name => "last_name"
value => "Spagarino"
type => "text"
frozen => true
required => false
error => null
id => "last_name"
label => "<label for="last_name">Last Name</label>"
html => "Spagarino<input type="hidden" name="l..."
phone-Primary-1 => Array (9)
name => "phone-Primary-1"
value => "619-9857483"
type => "text"
frozen => true
required => false
error => null
id => "phone-Primary-1"
label => "<label for="phone-Primary-1">Phone</l..."
html => "619-9857483<input type="hidden" name=..."
street_address-Primary => Array (9)
name => "street_address-Primary"
value => "3560 Paul Jones Ave"
type => "text"
frozen => true
required => false
error => null
id => "street_address-Primary"
label => "<label for="street_address-Primary">S..."
html => "3560 Paul Jones Ave<input type="hidde..."
country-Primary => Array (9)
name => "country-Primary"
value => Array (1)
0 => "1228"
type => "select"
frozen => true
required => false
error => null

Does ThanYou.tpl requires some conditionals to display certain fields?

My CiviCRM is 3.0.2 on the latest version of Joomla!


Andres

Open Source is Green

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: Custom Thank You template not showing Phone fields
February 17, 2010, 08:49:56 pm

try using this snippet:

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

let me know if the above works

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

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: Custom Thank You template not showing Phone fields
February 18, 2010, 03:43:48 pm
That worked! THANK YOU Lobo...

P.S> I always make a little contribution to CiviCRM when I get help and I think that everybody should do the same.
Andres

Open Source is Green

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Custom Thank You template not showing Phone fields

This forum was archived on 2017-11-26.