1

I am just starting to learn the Webform integration with CiviCRM. I know that I am able to open a case via the webform module. However, I only want to open a case if a condition is met.

For example, when the status field is equal to "Accepted", I like for the case information to show. Currently, I tried adding all the case information and tried leaving it blank, but it produces an error "Sorry but we are not able to provide this at the moment" as a result of missing information (I believe). Have anyone accomplished something similar to this?

1

You can achieve this by:

  1. Ensure you are using the latest version of webform_civicrm
  2. (CiviCRM tab) Set the Case Type field to "user select"
  3. (Webform tab) Edit the Case Type webform component, and change the widget type to "hidden". Set it's value to the case type of your choosing.
  4. (Webform tab - Conditionals) Add a conditional rule to show/hide the Case Type element based on the value of another field of your choosing (it's a hidden field already, you say, what's the point of hiding it? Either way it won't appear to the user, but this conditional rule will prevent the case from being created if your condition is not met).
  • This is SO awesome. Thank you very much! It worked perfectly. – Kristine Jun 28 '15 at 6:11
  • No prob. Webform conditionals can be quite powerful - preventing a hidden field from submitting its value by "hiding" it is a cool trick. Another neat trick is that you can use a conditional to change the value of a hidden filed. I.e. you could cause it to open a different type of case depending on some conditions, or many other possibilities. – Coleman Jun 28 '15 at 13:49

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.