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) »
  • Grouping Custom Data Groups
Pages: [1]

Author Topic: Grouping Custom Data Groups  (Read 1309 times)

andrewbelcher

  • Guest
Grouping Custom Data Groups
June 19, 2009, 02:52:49 am
Hi,

I'm trying to put an application form into the Custom Data... It is unfortunately a 7 page application form with a number of different sections within the form. What I'd like to achieve is having one tab (called 'Application Form') and within that having a number of inline data groups so I can have the different sections of the form collapsible.

Is that possible? I know my way around PHP so if it's possible only with a hack, can someone point me towards how to do that?

I suppose the ideal is having some kind of 'parent' system for custom data :P

Thanks!

Andrew

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: Grouping Custom Data Groups
June 19, 2009, 04:06:20 am
Can you create a session and simple use the url option in Profile Adv Settings so that when they complete one profile they get redirected to the next = and so on.

ALternatively you might want to help fund the proposal to get WebForm passing data in to civicrm if you are using Drupal
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

andrewbelcher

  • Guest
Re: Grouping Custom Data Groups
June 19, 2009, 04:19:11 am
Actually, I'm meaning from the civiCRM Contacts page (when you view a contact). Normally Custom Data is either an additional tab or displayed as a collapsible fieldset in the Summary page. What I would like to achieve is a new Tab with collapsible fieldsets in it.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Grouping Custom Data Groups
June 19, 2009, 03:43:44 pm
A single form w/ that many fields sounds less than desirable from a usability point of view - BUT if that's the requirement ...

There is a hook which you can use to add "your own" tabs to the contact view. I think this might be the best approach.

Sample code using this hook (from civicrm/drupal/civitest.module.sample in your downloaded codebase):

Code: [Select]
function civitest_civicrm_tabs( &$tabs, $contactID ) {

    // unset the contribition tab
    unset( $tabs[1] );
   
    // lets rename the contribution tab with a differnt name and put it last
    // this is just a demo, in the real world, you would create a url which would
    // return an html snippet etc
    $url = CRM_Utils_System::url( 'civicrm/contact/view/contribution',
                                  "reset=1&snippet=1&force=1&cid=$contactID" );
    $tabs[] = array( 'id'    => 'mySupercoolTab',
                     'url'   => $url,
                     'title' => 'Contribution Tab Renamed',
                     'weight' => 300 );
}

Probably best to get on IRC if you go down this road and get stuck.
Protect your investment in CiviCRM by  becoming a Member!

andrewbelcher

  • Guest
Re: Grouping Custom Data Groups
June 30, 2009, 06:14:04 am
Hi,

I'm a little confused with the hooks. I finally managed to get one working by putting the function straight into admin.civicrm.php. I then tried to include a file which contained only that function, and that didn't work. Am I missing something? The file got included, but absolutely nothing was run...

Andrew

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Grouping Custom Data Groups
June 30, 2009, 10:58:17 am
There's a bit of info on hooks in Joomla in this issue: http://issues.civicrm.org/jira/browse/CRM-4528

You might try and catch Brian (lcdweb) on IRC as I think he's got some hooks running in Joomla now.
Protect your investment in CiviCRM by  becoming a Member!

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

This forum was archived on 2017-11-26.