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 Profiles (Moderator: Dave Greenberg) »
  • HTML snippet vs. custom template
Pages: [1]

Author Topic: HTML snippet vs. custom template  (Read 859 times)

m@e247

  • I’m new here
  • *
  • Posts: 11
  • Karma: 0
HTML snippet vs. custom template
January 21, 2011, 09:12:03 am
I am trying to create a volunteer application form (Joomla 1.5.22, civicrm 3.3.2). When I link the profile directly to a menu item, it results in ugly formatting -- namely the field labels, some of which are long questions, are all squished up against the left edge, and the field help, some of which are long policy explanations, appear below the field rather than above it. So instead I tried using an HTML snippet. But when you save the profile, any error -- such as a required field not filled in -- results in the appearance of what looks like a directly linked profile (i.e., not the HTML snippet profile). So, is there some way to change the error redirect behavior? Or do I need to learn all about Smarty and customize a template? What is the best way to tackle this problem?

I love civiCRM and really appreciate all the work that goes into it. But as a non-programmer I find this frustrating, and the documentation not particularly helpful.

Michał Mach

  • Ask me questions
  • ****
  • Posts: 748
  • Karma: 59
    • CiviCRM site
  • CiviCRM version: latest
  • CMS version: Drupal and Joomla latest
  • MySQL version: numerous
  • PHP version: 5.3 and 5.2
Re: HTML snippet vs. custom template
January 24, 2011, 09:51:45 am
Did you try changing the looks of your profiles using css? You should be able to achieve quite a lot doing just that.

Thx,
m
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

My absolute favourite: Wordpress Integration!.

Donate Now!

m@e247

  • I’m new here
  • *
  • Posts: 11
  • Karma: 0
Re: HTML snippet vs. custom template
January 25, 2011, 07:13:46 am
As far as I can tell, the form profile appears to generate a table, with the field labels in the left column and the input object in the right column. I don't know of any way to use css to make the label appear above the input object and allow it to stretch the full width of the table. Is there a way to do that?

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: HTML snippet vs. custom template
January 25, 2011, 08:18:45 am
Quote from: m@e247 on January 25, 2011, 07:13:46 am
As far as I can tell, the form profile appears to generate a table, with the field labels in the left column and the input object in the right column. I don't know of any way to use css to make the label appear above the input object and allow it to stretch the full width of the table. Is there a way to do that?

No there isn't in css, you would need to create custom templates.

The recommended way of doing that is to keep the label short and put the long question as help, eg:
instead of
label: "Would you like to share your room with another participant (from the same sex)?"

do:
label : "room shared"
help: "Would you like to share your room with another participant (from the same sex)?"
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Michał Mach

  • Ask me questions
  • ****
  • Posts: 748
  • Karma: 59
    • CiviCRM site
  • CiviCRM version: latest
  • CMS version: Drupal and Joomla latest
  • MySQL version: numerous
  • PHP version: 5.3 and 5.2
Re: HTML snippet vs. custom template
January 26, 2011, 06:33:05 am
Quote from: m@e247 on January 25, 2011, 07:13:46 am
As far as I can tell, the form profile appears to generate a table, with the field labels in the left column and the input object in the right column. I don't know of any way to use css to make the label appear above the input object and allow it to stretch the full width of the table. Is there a way to do that?

Ah, sorry. I'm living in a world where recent changes to our templates are everywhere, forgot that profiles are not there yet.

Thx,
m
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

My absolute favourite: Wordpress Integration!.

Donate Now!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • HTML snippet vs. custom template

This forum was archived on 2017-11-26.