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) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Making checkbox options align vertically
Pages: [1]

Author Topic: Making checkbox options align vertically  (Read 1279 times)

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Making checkbox options align vertically
September 13, 2009, 05:46:51 pm
Hi - so a custom field , type = checkbox, has been set to "Options per line = 1" but these fields are being displayed via OnBehalfOf.tpl on a customised Member sign up/Contribution Page form - and the checkboxes are all on a single line - and I need to have them on separate lines.

In OnBehalfOf.tpl for each field we have
<tr>{assign var=customXX value=custom_XX_-1}
<td>{$form.$customXX.label}</td>
<td>{$form.$customXX.html}</td>

In the CRM/Contribut/Form/Contribution/Main.php the lines have been added for each custom field eg
CRM_Core_BAO_CustomField::addQuickFormElement ($this, 'custom_XX_-1,xx,false,false,false)

Is there some tweak in the way the QuickFormElement is being constructed that I need to tweak - can it be set to use the 'options per line' settings from the data field, or will I have to find where to add breaks to get them on separate lines? Thanks
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

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: Making checkbox options align vertically
September 13, 2009, 07:21:50 pm

if i'm not mistaken the option per line setting is done in the template. i think in a future release we should move this to the php code since its faster and better managed there

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

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Making checkbox options align vertically
September 13, 2009, 07:48:22 pm
were you suggesting i should be looking in the OnBehalfOf.tpl or Main.tpl? and any clues as to what I am looking for
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

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: Making checkbox options align vertically
September 13, 2009, 08:17:36 pm

templates/CRM/UF/Form/Block.tpl

search for options_per_line

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) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Making checkbox options align vertically

This forum was archived on 2017-11-26.