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 Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Custom Data Groups - do tabs work for anyone?
Pages: [1]

Author Topic: Custom Data Groups - do tabs work for anyone?  (Read 1944 times)

carlessa

  • Guest
Custom Data Groups - do tabs work for anyone?
August 29, 2007, 06:53:15 am
Hi,

Having played around with CiviCRM for many hours recently, read all the documentation I can find, searched these forums and the web, I still can't find out how to get the "tabs" mechanism to work for the data fields on a profile. If anyone has managed to get these working, please could you let me into the secret?

Now for the details, starting at the beginning. I'm using Joomla 1.0.12, with CiviCRM 1.8.10954, on apache 2.0.52. I've installed CiviCRM via the scp-unzip-copy-local install method, which seemed to work after some fiddling with PHP and MySQL settings. I've also applied the session creation mod which CiviCRM needs to work with Joomla 1.0.x.

What I'm trying to do is set up a few custom data groups, to record various different types of details about the site users. Ideally, the users should be able to hit a "my details" menu option and see their details as a set of tabs, each containing a subset of their personal details. If it helps, imagine one tab with their contact details, another to enter their favorite sports teams, and another to enter their important dates.

So I have two custom data groups, one called "Favorites", one called "Dates". Each of these has their "Display Style" set to "tab", and contains a number of different data fields. The contact details can be constructed using the standard CiviCRM fields.

My initial attempt was to create a single profile, manually adding all the contact fields, the Favorites fields and the Dates fields. Then create a Joomla menu link to the component, setting the task to "profile edit" and the profile ID to 1 (yes, I checked the ID). When I follow that link, the details are all displayed in one large list, no tabs, no grouping or sections at all.

Following that, I've tried all sorts of options and settings, messed about trying to nest profiles and data groups, searched for CiviCRM tabbing extensions, reinstalled the whole thing a few times, and finally despaired of getting anywhere. Which is where I am now.

When I look at the user details through the backend admin interface, I do see tabs, both Favorites and Dates have their own tabs, so I assume that at least a little bit of the tab functionality works, but no hint of a tab on the front end at all.

Any suggestions, help, tips or tricks gratefully received!

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 Data Groups - do tabs work for anyone?
August 29, 2007, 12:13:35 pm

Profiles do not have any "tab" functionality either in the backend or the frontend. Profiles will always appear as a list of fields with minimal formatting. You could do some minor formatting using the pre/post help on profile fields. If you want to change the display, you can write a custom template for your needs or use a standalone form.

http://wiki.civicrm.org/confluence/pages/viewpage.action?pageId=12924

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

carlessa

  • Guest
Re: Custom Data Groups - do tabs work for anyone?
August 29, 2007, 12:29:12 pm
Hi Donald,

Ahh, thanks for that - it starts to explain things. I guess that means I'm missing the point on a few other aspects of profiles and custom data groups then. Off the top of my head, the questions I've got now are:

1. On a custom data group, there is a parameter called "Display Style" which can be set to either "Tab" or "Inline". You've said that profiles don't have any tab functionality, so what does this parameter do?

2. When a profile is displayed on the front end, there is a little plus/minus icon, which causes all the fields of the profile to be hidden or shown. If the data fields cannot be grouped, and so selectively hidden or displayed, what is the point of the plus/minus icon and the collapsible fields?

3. In the backend pages, the custom data groups are added as new tabs to the contact infomation pages. Is there any way to make use of this tabbing mechanism in the frontend pages?


Thanks for the link about customising the templates. I've started hacking on the various PHP files under the CRM directory to fix other problems with the display logic, but it looks like I could use a more structured approach rather than delving straight in to alter the core classes.


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 Data Groups - do tabs work for anyone?
August 29, 2007, 01:09:02 pm

I would advise against hacking core code as much as possible. We move at a pretty fast pace and will be difficult for you to keep pace and/or merge the changes

With regard to your questions:

1. The display style is for custom group display in edit/view contact at the backend. Note that custom groups are different from profile groups

2. Thats a good question and might be worth filing an issue. I'm not sure of the purpose of that icon on edit/create pages (and IMO is a bug). That +/- icon is used during search when u might want to hide the search fields so users can see the results

3. in the frontend we expose profiles, not contact pages. So the answer is no :(

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

carlessa

  • Guest
Re: Custom Data Groups - do tabs work for anyone?
August 29, 2007, 05:00:23 pm
Quote
I would advise against hacking core code as much as possible.

Absolutely agree. If there's a suitable extension mechanism I'll use that, and I'll try to report all bugs and fixes back here. The last thing I want is to be maintaining a patch list!

Quote
1. The display style is for custom group display in edit/view contact at the backend.

Ah right,  I assumed there was more control over the front end behaviour from the profile/custom data config. It looks like I should be working on custom templates and API integration to get the level of control I want.

Quote
Note that custom groups are different from profile groups

I've noticed this - and there doesn't seem to be an easy way to use the two together either. No opportunity to include all the fields from a data group in a profile. Lots of tedious clickety click work instead :(

Quote
2. Thats a good question and might be worth filing an issue.

Good to know. I'll have a browse through the Issue Tracker to see how to handle bug reporting.

Quote
3. in the frontend we expose profiles, not contact pages. So the answer is no :(

Hmm, might be time for some experimentation, if a bundle of CSS+JS works in one place, I'm sure it can be made to work in another  ;)

Thanks again for taking the time to answer my newbie questions, much appreciated!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Custom Data Groups - do tabs work for anyone?

This forum was archived on 2017-11-26.