7

I have a webform that users use to register themselves and their family members for events. These events have fees, and in the past I have linked users to a contribution page that they use separately form registration. We just got a better payment processor, so now webform can take fees! If, that is, I can figure out how to make it work.

Right now, I have it working like this:

  • User selects events they want to register for
  • "Event Fee" field is private so that it is hidden from the user
  • There are 2 conditionals in the webform so that if user selects event1, the fee is $15, and if user selects event2, the fee is $20.

conditionals setup

Currently, this results in the correct fee if users select any one event, but if they select both, it charges the higher price ($20) for both events, for a total of $40.

So my questions are:

  1. Can event fees be combined using conditionals, and if so what settings would you use? or
  2. Can webform fees be automatically generated in webform another way?
1
  • Also-- there's no way to add a discount code here, is there? I have CiviDiscount... (I know this is a separate q, but it's secondary so I'm not posting it yet)
    – naomisl
    Jul 28, 2016 at 1:46

3 Answers 3

4

Ah yes - you can do this without Conditionals! @Coleman showed me at the CiviCON sprint back in Ft Collins - Here's how in screenshots (below):

NOTE: the only downside is... that CiviCRM core isn't expecting that this is possible - so if you end up checking a participant record - it thinks you owe someone a refund [having paid $500 - the event was only $300]. But if you can make that clear to your admins - they can work with this.

1. In Webform CiviCRM tab -> Event Registration: enter image description here

2. In Webform tab -> hit Edit on the two participant fees - and add a $ number: enter image description here

3. This is what it looks like for the user (View Webform):

enter image description here

4. And on the Payment Page of the Webform: enter image description here

1
2

Posting the settings (or a screenshot) of your conditional statements for the form would be helpful. The end-goal isn't quite clear, I will assume you want to charge $35 if a participant selects both events.

My first guess is that you're only using an 'or' condition when you need to also use an 'and' or else both events get set up to $20 whenever event 2 is selected... Try a conditional setup like 'If event 1, set $15', 'If event 2, set $20', if event 1 AND event 2, set $35'.

Depending on the order of operations for conditionals, you may need to be as explicit as something like 'If event 1 NAND (and not) 2, set $15', If event 2 NAND 1, set $20', 'If event 1 AND 2, set $35'.

Someone can correct me, but as far as I know CiviDiscount is not compatible with contributions through webform, as I have not found a way, and there is no mention of webform in the civiDiscount documentation (https://github.com/dlobo/org.civicrm.module.cividiscount)

3
  • Thanks for your help! I added a screenshot, maybe that can clarify a bit. If I have to add conditionals for each combination, conditionals may not be a tenable solution...we have different events at different prices coming and going rather constantly.
    – naomisl
    Jul 28, 2016 at 21:58
  • And yes, the end goal is to charge $35 when both events are registered for.
    – naomisl
    Jul 28, 2016 at 21:58
  • Try just adding "if both, set $35". If you just have sets of 2 events at a time, this should be relatively painless. If more, possibly try either KarinG's solution above (although the 'balance owed' might be equally painful, administratively), or this extension which has been suggested to me before, but I haven't tried it yet, which I believe would allow multiple events to be aggregated in a civiCRM event page rather than a webform (assuming you are not using other webform-specific functionality): civicrm.org/extensions/event-additional-signup Aug 2, 2016 at 15:39
1

In case it is of interest I put together some documentation of a complex Webform set up that allows for multiple people to be registered for multiple events independent of each other, eg c1 can register for A and C, c2 can register for A and B, c3 can register for A and B and C.

There are a lot of conditionals involved ;-)

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.