3

I am currently using Drupal 7.52, CiviCRM 4.6.24, and Webform 7.x-4.14

I have a CiviEvent where I want to register multiple registrations and a matrix of different combinations of payment levels and options. I am currently configuring a Webform where I have configured (at least in a draft form) for the CiviEvent participant fee to be passed to Stripe and the registration.

I also have the participant_status_id field exposed to the Webform; within CiviCRM processing I have the Event Registration > Registration Status set to * User Select * - I noted that if it was set to anything else then it would not be exposed in the Webform.

What I want to do is set the Registration Status using conditionals. So if the registration is paying using Stripe in full then set to Registered, or if paying by Cheque set to Pending from Pay Later.

The Webform Component allows me to select which CiviEvent status I want exposed to the form (I opted for Registered, Pending from Pay Later, Partial Payment), but I then can't set that using Conditionals. I also notice that when I can not set a Select Option webform component using Conditionals as well; maybe it is not possible?

I suspect my alternative would be a simple textfield, but I am looking for a better way.

  • I think we have had a lot of situations where we have used Conditionals on such types of field, but not that exact one, and it is always a case of figuring out what value needs to be set in the Conditional that would cause the target field to set/change its data. You may have already tried every variation conceivable but that is all i can suggest – petednz - fuzion Mar 28 '17 at 19:40
1

What you are attempting to do should already be handled by the module automatically. Simply omit the status field from the form (leave it set to "Automatic" on the CiviCRM tab of your webform) and the status will be set based on the payment status to either "Registered" or "Pending from pay later" or "Pending from incomplete transaction".

You can see where this is handled by webform-civicrm here in the code.

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.