Please could I have some suggestions on how to meet this requirement:

I need to be able to add a support plan to a contact. The support plan has an indeterminate number of goals. Each goal has a type, a description and also an indeterminate number of objectives, each of which has a type, a description and some dates. The whole support plan must be visible on the screen at one time, not just while viewing but also while editing.

Civicase (mapping cases to goals) was my original thought but it does not fulfil the requirement of having it all on one screen. EDIT Also, I am not sure how I would record this data in CiviCase because a goal has to have an indeterminate number of objectives and it is not possible to create a repeating set of custom fields against a case. /EDIT

Custom fields, as they stand, do not provide what we need because although you can have repeating sets of fields, you cannot have repeating sets of fields within them.

I am an experienced PHP coder and Drupal dev so taking a custom-code approach is within reach, however the project does not have a huge timescale so I would like to keep it to a minimum or avoid if at all possible.

Here's what I've thought of so far:

  1. Submit a pull request to core, allowing for nested sets of custom fields (I think this would take a long time, both the coding and the administrative process).

  2. Use a Drupal page, so that I can utilise field collections. The problem with this though is that we would not be able to use CiviCRM reporting tools to report on the data. There would also be questions about how to link the drupal page to the contact (logically and visually).

Any ideas? Thanks!

2 Answers 2


Case seems like the good fit for the model, I'd suggest to keep it and create a civicrm extension that provides the UI you need. The integration with angular is fairly complete so loading/saving the activities from your UI should work fine.

If you want to dig into angular for civi, Tim session might help you getting started.

  • Thanks. Could you point me to any resources on how to develop that?
    – naomi
    Jan 21, 2016 at 17:34
  • Hmm, also, see edit - CiviCase wouldn't allow the nesting I need OOB
    – naomi
    Jan 21, 2016 at 17:35
  • why custom fields? mapping each objective to a case, or have an "objective" activity type for the goal case that contains the custom fields you need
    – Xavier
    Jan 21, 2016 at 17:43
  • Ah yes I hadn't thought of objectives as activities but that would provide the required structure. I think this is probably the right solution although I will need to put a temporary one in place for the deadline and then tackle this.
    – naomi
    Jan 21, 2016 at 21:25

we have done a slightly related solution where each student has to set a goal, then those get reviewed (but a determined number of times). The approach we took relied heavily on Views and Webform, with Activities being the 'holder' of the data. As our situation had a determined number of reviews we created all the fields required eg Review Comments, Rating, Date etc, in a Set of fields on the Activity - ie we had Review Comment 1, Rating 1, Date 1, and then also Review Comment 2, Rating 2, Date 2 etc.

We then used Views to display lists of students with a link to 'Review' which would open webform with relevant cid and the 'open' Activity, so they could then add the next round of data to that Activity.

I know this doesn't answer your core requirement, but if you need a light solution, and 'if' your maximum number of reviews isn't a ridiculous size, this might be worth considering.

EDIT: in a comment below I also suggest using a single Activity per goal and report that to a single screen in Views

  • oh yes ours is part of civicase but doesn't 'need' to be for the above to work.
    – petednz - fuzion
    Jan 21, 2016 at 18:30
  • Thanks. I think I will use something like this as a temporary solution (although I will put the custom fields on the contact directly and not bother with the webform or view). But ultimately it is required that the number of objectives be variable.
    – naomi
    Jan 21, 2016 at 21:32
  • Other option would be to have an Activity per review. Hence each review adds a new Activity. Then you just need a way of reporting all those on a single screen. For Drupal, Views is your friend.
    – petednz - fuzion
    Jan 21, 2016 at 21:55
  • Yes I think I will go with activity per objective (review in your case) but a drupal view won't be enough I'm afraid, since the desired ui has to support editing (unless editable views works with civicrm entity? Maybe that's worth a try)
    – naomi
    Jan 22, 2016 at 7:20
  • Editable views? not as far as i recall. so a table with a list/summary of the Activities (goals) with a link to 'edit' which would open the Activity would not suffice?
    – petednz - fuzion
    Jan 22, 2016 at 22:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.