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 CiviEvent (Moderator: Yashodha Chaku) »
  • Divide Profile Into Sections?
Pages: [1]

Author Topic: Divide Profile Into Sections?  (Read 1389 times)

qjensen

  • I post frequently
  • ***
  • Posts: 141
  • Karma: 11
    • Scaled Solutions
  • CiviCRM version: 4.5
  • CMS version: Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Divide Profile Into Sections?
July 09, 2010, 01:49:03 pm
I have an event reg form that I am working on that has 2 profiles. One is to collect contact information and the other collects the workshop selections. In the profile for the workshop selections, I have different types of selections to be made

Please Select a Pre-Conference Workshop (radio button selector)
foo
bar
baz

Please select a workshop for each time slot
Friday Aug 13 10:00 am - 11:45 am
Workshop 1
Workshop 2
Workshop 3

Fri Aug 13 1:30 pm - 3:00 pm
Workshop 4
Workshop 5
Workshop 6
(repeat as needed)

What I would like to do is have a section header, for lack of a better term, that would visually break these apart. The way things work right now I can't find a way to put the "Please select a workshop for each time slot" into the form, apart from creating a custom form.

If this isn't possible, how difficult would it be to create a new profile field type called separator or section head to accomplish this? I would be willing to give it a go.
« Last Edit: July 09, 2010, 01:53:10 pm by qjensen »
Quint Jensen
Web Developer
Scaled Solutions
--" Remove the 'I want you to like me' notes from your forehead and place them where they truly will do the most good -- on your mirror!" Author Unknown

TwoMice

  • I post frequently
  • ***
  • Posts: 214
  • Karma: 16
    • Emphanos
  • CiviCRM version: Always current stable version
  • CMS version: Drupal 7
Re: Divide Profile Into Sections?
July 09, 2010, 02:41:45 pm
I've been working to get support for multiple profiles in online registration forms, basically for the same reason as what you're describing.

There's an issue for it here http://issues.civicrm.org/jira/browse/CRM-6256 , though I have not yet posted a patch for it.

Would this solve your problem?

Please consider contributing to help improve CiviCRM with the Make it Happen! initiative.

qjensen

  • I post frequently
  • ***
  • Posts: 141
  • Karma: 11
    • Scaled Solutions
  • CiviCRM version: 4.5
  • CMS version: Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Divide Profile Into Sections?
July 10, 2010, 03:19:31 pm
That is exactly what I want to accomplish. Allowing unlimited profiles would be a better long term solution, and from the looks of things, easier than my idea of allowing some kind of separator field type in profiles.

I am pretty new to CiviCRM development, but I would be willing to help with this code if you are looking for assistance.
Quint Jensen
Web Developer
Scaled Solutions
--" Remove the 'I want you to like me' notes from your forehead and place them where they truly will do the most good -- on your mirror!" Author Unknown

kasiawaka

  • I post occasionally
  • **
  • Posts: 42
  • Karma: 4
    • Kasuwade Solutions Inc.
Re: Divide Profile Into Sections?
August 16, 2010, 02:00:28 pm
That is something we struggle with every time we need to create a longer profile. Most clients requests that we allow them to display some kind of header before a group of fields with the same purpose, like Personal Information, Availability, Additional Information.

So far we don't have a pretty solution so the ability to either display several profiles or to add a field to a profile that will be called "header" would work. That "header" field should not show up in the Contact profile information but only on the profile, when data is entered.
Kasia Wakarecy
http://kasuwade.ca

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Divide Profile Into Sections?
August 16, 2010, 02:10:20 pm
Hi,

Are you aware you can write a custom template just for one profile ?

Then you can split the fields and display them exactly the way you want.

(Kurund even did a nice wizard, he wrote a blog post about it if I recall properly)

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

kasiawaka

  • I post occasionally
  • **
  • Posts: 42
  • Karma: 4
    • Kasuwade Solutions Inc.
Re: Divide Profile Into Sections?
August 16, 2010, 02:40:23 pm
Are you referring to this page? http://wiki.civicrm.org/confluence/display/CRMDOC32/Customize+Built-in%2C+Profile%2C+Contribution+and+Event+Registration+Screens

I find it cumbersome to create a profile and then create a template and manually list every field in the template .. As soon as there is any change in the profile, the template has to be modified.

I would like to see an option like I've seen in, for example, Webform module for Drupal and other places where, when you add a field to a form, you can decide if this is a "fieldset" type of field. If it is, it's span across 2 columns and doesn't have a label, only a value is displayed as a title for that field.

To sum this up, a field "header" type that:
- is a view only field
- spans across 2 columns (label and value filed) on the profile form
- can contain html
- is not displayed on the contact profile unless it's in the "edit" state
Kasia Wakarecy
http://kasuwade.ca

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Divide Profile Into Sections?
August 16, 2010, 03:57:38 pm
Hi,

You got much more freedom, but yes, more cumbersome.  To make it easier, I tend to loop on the fields, and test the id to decide if I create a new "block" before the field or not.

This being said, having as many profiles as you want would be a good addition indeed. to my knowledge, no code as landed in CiviCRM on that, so custom template is the next best solution ;)

This being said, if you have some budget, might help convince TwoMice to finish the code and submit it...

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

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: Divide Profile Into Sections?
August 17, 2010, 05:18:39 am

this would make a very nice community contribution :)

ping us on IRC if u need help getting started

lboo
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) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Divide Profile Into Sections?

This forum was archived on 2017-11-26.