5

The charity I work for has two specific scenarios where I need to create conditional activities based on form input.

1) We run a food bank and referring organisations fill in an online form. However, after six food parcels within a three month period, we expect those being referred to book an appointment with one of our client advisors. How can I set the form submission to check how many times a person has been referred and, if they have reached the limit, change the form to book an appointment.

2) We host a dinner, with a limit of 60 places, where volunteers are expected to bring along someone who isn't linked with the charity. How do I set a condition on the form to check if the registrant is bringing someone who isn't linked to the charity and, if not, place them on a waiting list.

2

If you're running CiviCRM in Drupal you can use the Webform CiviCRM module to provide conditionality to Civi activities

  • And for scenario 1 a Smart Group could be created based on the criteria and upon form submission a check is run for the condition of iscor is not a member of the group. For scenario 2 the condition can be if the second person is or is not an existing contact, or if the second person is already an existing contact, is or is not an existing contributor or past Participant in the same type of Event. – Joe McLaughlin Jul 11 '15 at 12:25
  • @Joe you should move your comment to an answer. – Allen Hutchison Jul 12 '15 at 0:16
  • We're using WordPress. – Keith Reed Jul 12 '15 at 16:06
  • Keith, seems worth it to post a new question - Is there a WordPress equivalent to the Webform CiviCRM module for Drupal? – Joe McLaughlin Jul 15 '15 at 4:50
  • @Joe A quick scouring of the forums suggests that currently there is only CiviVIP's Gravity Forms Integration which is a paid for service. I'm looking for a way to do it "in-house". – Keith Reed Jul 16 '15 at 7:15
2

Keith I know you're on WordPress, just adding this as an addition to Sean's answer above for those folks using Drupal, and the Webform CiviCRM module: - for scenario 1 in the question, a Smart Group could be created based on the criteria and upon form submission a check is run for the condition of iscor is not a member of the group. - for scenario 2 the condition can be if the second person is or is not an existing contact, or if the second person is already an existing contact, is or is not an existing contributor or past Participant in the same type of Event.

1

I don't follow how the data is getting in to your system, but, if it is being addd by admin then would something like this get you towards 1/

Create an Activity Type that has 6 x date fields for Parcel Request #1, #2 etc.

So when a new request for parcel comes in, admin checks if contact has an 'open' activity, and if so adds the date to the next available field, and if no open activity exists then they create a new one.

Find some way of making an Activity of this type that is over 3 months old automatically be set to Closed (can CiviRules do that?)

That way you can't be adding a 6th date to an Activity that is over 3 months as it would be closed.

Then you could build a trigger to run if that critical 6th date field actually gets data put in to it, maybe a post process hook on the Activity, which triggers a new Activity of type "make an appointment" that gets assigned to your manager.

(pete stops waving hands around wildly)

  • We work with a number of partner organisations and, when they have a client that requires a food parcel, they access our website and fill in the form. What I'm looking for is a way to flag up on that form that Client X has reached the 6 parcel limit and needs to book an appointment with a client advisor. – Keith Reed Jul 16 '15 at 7:13
  • If having a partner org update Activities is harder on WP than Drupal, you could have a Drupal admin frontend for Civi. Your partners can then manage this process via Webforms. ie the Partner Orgs would have Drupal log in. They would have access to a 'list' of their 'clients'. They could create new Activities for those clients, eg food parcel request. And if an existing Food Parcel request Activity was 'open' then they would be able to update it, and fill in Date 2, Date 3 etc. If they get as far as Date 6 before the Activity is 'closed after 3 months' then a bell rings in your office ;-) – petednz - fuzion Jul 16 '15 at 20:22
  • of course that suggestion depends on how tightly wired your WP needs to be to civi. We have often sidestepped the constraints of WP being the 'main public' site, but wiring Civi to Drupal instead and doing the hard work there, and just skinning the Drupal site to mimic WP. Then any 'forms' etc are actually on the Drupal site, but visitors don't really know/care. Just a thought in case WP adds too many limitations to your workflow. I would be happy to talk you through the Drupal workflow if that helps. – petednz - fuzion Jul 16 '15 at 20:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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