Answers.Body: <p>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".</p>
  
  <p>You can see where this is handled by webform-civicrm <a href="https://github.com/colemanw/webform_civicrm/blob/7.x-4.17/includes/wf_crm_webform_postprocess.inc#L1042-L1049" rel="nofollow noreferrer">here in the code</a>.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-28T22:15:55.543Z
Answers.LastActivityDate: 2017-03-28T22:15:55.543Z
Answers.UserDisplayName: Coleman
Body: <p>I am currently using Drupal 7.52, CiviCRM 4.6.24, and Webform 7.x-4.14</p>
  
  <p>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.</p>
  
  <p>I also have the <em>participant_status_id</em> 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.</p>
  
  <p>What I want to do is set the <em>Registration Status</em> 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.</p>
  
  <p>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?</p>
  
  <p>I suspect my alternative would be a simple textfield, but I am looking for a better way.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-03-28T19:40:19.913Z
Comments.Text: 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
Comments.UserDisplayName: petednz - fuzion
Tags: <civievent><drupal><webform-civicrm>
Title: How can I change a CiviEvent status using Webform Conditionals?
ThreadText: # How can I change a CiviEvent status using Webform Conditionals?
  
  (Asked by: username_0 on 2017-03-28)
  
  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.
  
  **Tags:** civievent, drupal, webform-civicrm
  
  > **Comments:**
  > **username_1**: 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  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2017-03-28. Score: 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](https://github.com/colemanw/webform_civicrm/blob/7.x-4.17/includes/wf_crm_webform_postprocess.inc#L1042-L1049).
  
  
  ---
  
  