Answers.Body: <p>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.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-15T04:48:37.347Z
Answers.LastActivityDate: 2015-07-15T04:48:37.347Z
Answers.UserDisplayName: Joe McLaughlin
Answers.Body: <p>If you're running CiviCRM in Drupal you can use the Webform CiviCRM module to provide conditionality to Civi activities</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-11T12:25:11.653Z
Answers.Text: 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.
Answers.UserDisplayName: Joe McLaughlin
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-12T00:16:48.080Z
Answers.Text: @Joe you should move your comment to an answer.
Answers.UserDisplayName: Allen Hutchison
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-12T16:06:53.500Z
Answers.Text: We're using WordPress.
Answers.UserDisplayName: Keith Reed
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-15T04:50:12.740Z
Answers.Text: Keith, seems worth it to post a new question - Is there a WordPress equivalent to the Webform CiviCRM module for Drupal?
Answers.UserDisplayName: Joe McLaughlin
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-16T07:15:03.017Z
Answers.Text: @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".
Answers.UserDisplayName: Keith Reed
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-11T11:40:15.503Z
Answers.LastActivityDate: 2015-07-11T11:40:15.503Z
Answers.UserDisplayName: Sean Kenny
Answers.Body: <p>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/</p>
  
  <p>Create an Activity Type that has 6 x date fields for Parcel Request #1, #2 etc.</p>
  
  <p>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.</p>
  
  <p>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?)</p>
  
  <p>That way you can't be adding a 6th date to an Activity that is over 3 months as it would be closed.</p>
  
  <p>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.</p>
  
  <p>(pete stops waving hands around wildly)</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-16T07:13:24.423Z
Answers.Text: 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.
Answers.UserDisplayName: Keith Reed
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-16T20:22:08.513Z
Answers.Text: 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 ;-)
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-16T20:24:43.833Z
Answers.Text: 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.
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-15T06:42:37.877Z
Answers.LastActivityDate: 2015-07-15T06:42:37.877Z
Answers.UserDisplayName: petednz - fuzion
Body: <p>The charity I work for has two specific scenarios where I need to create conditional activities based on form input.</p>
  
  <p>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.</p>
  
  <p>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.</p>
  
Tags: <civievent><wordpress><contacts><custom-fields>
Title: How do I create conditional forms?
ThreadText: # How do I create conditional forms?
  
  (Asked by: username_0 on 2015-07-11)
  
  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.
  
  **Tags:** civievent, wordpress, contacts, custom-fields
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_1 on 2015-07-15. Score: 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.
  
  
  ---
  
  ### Answer by username_2 on 2015-07-11. Score: 2
  
  If you're running CiviCRM in Drupal you can use the Webform CiviCRM module to provide conditionality to Civi activities
  
  > **Comments:**
  > **username_1**: 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.  
  > **username_3**: @Joe you should move your comment to an answer.  
  > **username_0**: We're using WordPress.  
  > **username_1**: Keith, seems worth it to post a new question - Is there a WordPress equivalent to the Webform CiviCRM module for Drupal?  
  > **username_0**: @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".  
  
  ---
  
  ### Answer by username_4 on 2015-07-15. Score: 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)
  
  > **Comments:**
  > **username_0**: 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.  
  > **username_4**: 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 ;-)  
  > **username_4**: 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.  
  
  ---
  
  