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 »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • "Options Per Line" seems to break the contribution template
Pages: [1]

Author Topic: "Options Per Line" seems to break the contribution template  (Read 1339 times)

Barnacle

  • I post occasionally
  • **
  • Posts: 62
  • Karma: 2
    • White Fuse Media
  • CiviCRM version: 4.4
  • CMS version: Drupal 7
  • MySQL version: 5.x
  • PHP version: 5.3
"Options Per Line" seems to break the contribution template
June 27, 2013, 04:16:32 am
I'm having some trouble with some custom fields. I created a field "Annual Turnover" with radio buttons, and added it to a membership signup contribution page.

If I put a value in "options per line," the whole field disappears from the contribution page display. It's not just hidden - there is no HTML there.

The only way to make the field appear in the form at all is to leave the "options per line" value empty, but then my radio buttons appear all in a line.

I think this must be a bug in the templates? Can anyone advise?
--
http://whitefusemedia.com/

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: "Options Per Line" seems to break the contribution template
June 27, 2013, 01:02:21 pm
Can you recreate on the public demo. I did a quick experiment with the sample 'Most Important Issue' custom field radio button. I tried 1 and 2 options per line and included with the Name and Address profile in 2 different contribution pages.

If you can recreate, then definitely take some screenshots, describe the configuration used, and try using Firebug to see if you can find the problem with the HTML markup.
Protect your investment in CiviCRM by  becoming a Member!

Barnacle

  • I post occasionally
  • **
  • Posts: 62
  • Karma: 2
    • White Fuse Media
  • CiviCRM version: 4.4
  • CMS version: Drupal 7
  • MySQL version: 5.x
  • PHP version: 5.3
Re: "Options Per Line" seems to break the contribution template
June 28, 2013, 03:45:22 am
Thanks for the rapid response. I've been able to replicate this problem on the demo site. Here are my screenshots recreated on drupal.demo.civicrm.org:

  • Contribution Page
  • "On Behalf of Organisation" set to "required"
  • The included profile has been set to "On Behalf of Organisation"
  • The "On Behalf of Organisation" profile has had the custom field included.
  • I used checkboxes this time but the problem is the same

When "options per line" is left blank, the checkboxes appear (you can see them in the HTML elements at the bottom).
When it is set to 1 or any other number, they vanish and only the label remains.
--
http://whitefusemedia.com/

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: "Options Per Line" seems to break the contribution template
June 28, 2013, 01:44:53 pm
Seems like a bug in the OnBehalfOf.tpl file. Checking on it now.
Protect your investment in CiviCRM by  becoming a Member!

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: "Options Per Line" seems to break the contribution template
June 28, 2013, 02:52:01 pm
Ok, found it a filed fix for the next release (4.3.5). http://issues.civicrm.org/jira/browse/CRM-12980

If you want to patch your site, it's a one-line change, line 83 in templates/CRM/Contribute/Form/Contribution/OnBehalfOf.tpl

Code: [Select]
// change this
{foreach name=outer key=key item=item from=$field}

// to this
{foreach name=outer key=key item=item from=$form.onbehalf.$fieldName}
Protect your investment in CiviCRM by  becoming a Member!

Barnacle

  • I post occasionally
  • **
  • Posts: 62
  • Karma: 2
    • White Fuse Media
  • CiviCRM version: 4.4
  • CMS version: Drupal 7
  • MySQL version: 5.x
  • PHP version: 5.3
Re: "Options Per Line" seems to break the contribution template
July 01, 2013, 07:42:03 am
That's really helpful; thank you! And glad to know it's fixed for the next release :)
--
http://whitefusemedia.com/

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • "Options Per Line" seems to break the contribution template

This forum was archived on 2017-11-26.