CiviCRM 5.20.0 Drupal 7.69 iATSPayments 1.7.1 Webform/Civi Integration 7.x-4.28

This webform is used for non-taxdeductible giving. I have two categories set at the top of the form, giving for food and lodging while visiting campus and assisting our short-term volunteers with the cost of their food and lodging. Often donors will want to set up a monthly recurring if they are assisting with our our volunteers food and lodging. But visitors do not want/need to have monthly recurring just for a visit to campus. So, I used conditionals to only show the parts needed for the option they start with. If they choose to give to food and lodging, then I do not show "I want this to recur monthly" and I have Recurring monthly default set to no. But all giving to this is created as a recurring contribution. You can select "Payment for short-term staff room and board" and it shows the "I want this to Recur" with the default of NO and if you leave it on No, it does not create it as recurring.

I changed my conditional for the first option so that "I want this to Recur" is set to No. But I get the same results. It creates all contributions for this option as recurring.

Additional info:enter image description here The attached screenshot shows how I have Options set for civicrm_1_contribution_1_contribution_installments so it sends it as a number. The Value is what the consumer sees visually, the Key is the number that gets sent to civicrm_contributions_installments. It is obviously sending it as a number because it does work for the second option when people give to cover room and board for volunteers, with that they can choose to have it recur or not recur. There is only one civicrm_1_contribution_1_contribution_installments on my form so both options are using the same installments question.

The problem is, it is overriding my default = 1 AND my conditional to set civicrm_1_contribution_1_contribution_installments to 1. It is putting it in the installments column with a 0. But only for the first option of the form, the second option is working as designed.

2 Answers 2


You need to set a conditional to ensure instalments = 1 for the one time scenario. Instalments = 0 is open ended recurring and any other number is recurring with that number of instalments.

There was a change/PR to the repo that enabled open ended recurring contributions: https://github.com/colemanw/webform_civicrm/pull/141 so now it's even more important than before to ensure civicrm_1_contribution_1_contribution_installments is a number and set properly. It's a Number --> No is not a valid value.

Best to keep the Widget: Number -> this is how the component config looks when it's first enabled:

enter image description here

If you want to hide the Element -> change the widget to Hidden and use conditionals to set its value to either 0 or 1 (based on another field).

  • My webform question for "I want this to Recur Monthly" has the form key civicrm_1_contribution_1_contribution_installments with the Options default set to Key = 1 Value = No And than I also have the conditional to set that answer to No. Maybe I need to try 1 instead of No?
    – Iowa Boy
    Feb 26, 2020 at 6:23
  • I just changed my conditional so that it sets that to 1. I ran a donation and it created a recurring contribution.
    – Iowa Boy
    Feb 26, 2020 at 6:32
  • I also unchecked Required for the installments. I tested it again and it still created a recurring contribution. I looked in the tables and the default there is 1 and the Conditional is to set that to 1 as well. So the tables seem to have the right data. The weird thing is that it used to work properly.
    – Iowa Boy
    Feb 26, 2020 at 7:00
  • I've added some more detail in the Answer. It' important that civicrm_1_contribution_1_contribution_installments is a number Feb 26, 2020 at 16:31
  • I have the Key for civicrm_1_contribution_1_contribution_installments as a number (default is 1). I will edit my question to make it more clear what I am asking.
    – Iowa Boy
    Feb 26, 2020 at 16:44

Webform does not include conditionally hidden components in the submission. Civi Core treats a Null for installments as "Open Ended Recurring". So with submitting nothing, it will always be a recurring contribution.

The only option I can come up with is to not hide the installments option.

  • The issue is that you have changed the Widget of the field from its default: Number; You changed it to a Select - changing widgets can have unintended consequences. Feb 26, 2020 at 19:04
  • I behaves in exactly the same manner if I have the Widget as a Number or as a Select Option. My answer here is still the correct answer for this. Once it is not shown via conditionals, the code overrides your set default or conditional "set to" and makes it an unending recurring.
    – Iowa Boy
    Feb 26, 2020 at 22:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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