We are using a node entity "Event" and a single webform 'Event subscription". The node entities have a webform field. The UI for this now shows "open" "close" and "data" as configuration possibilities. So we can create "Event A" which has subscriptions open and "Event B" with subscriptions closed. What I would like to do is to choose on each node separately how many people can subscribe for "Event A" and 'Event B".
Is this somehow possible ?

Comments

kriboogh created an issue. See original summary.

jrockowitz’s picture

Version: 8.x-4.x-dev » 8.x-5.x-dev
Issue summary: View changes
StatusFileSize
new9.6 KB
new323.69 KB
new262.4 KB

Yes, this is possible. The pattern would be to add a submission limit field called to field_webform_limit_total to your event node and then have its value applied to the webform using the settings handlers.

I did find a bug when passing a token value to an integer setting which is being addressed via the attached patch.

jrockowitz’s picture

Status: Active » Needs review

  • jrockowitz committed abe787c on 2955056-limit-submissions
    Issue #2955056 by jrockowitz: Webform field configurtion - limit...
jrockowitz’s picture

StatusFileSize
new18.3 KB

The attached patch adds the above pattern to the 'Webform Demo: Event Registration System' module.

  • jrockowitz committed 995d570 on 2955056-limit-submissions
    Issue #2955056 by jrockowitz: Webform field configurtion - limit...

  • jrockowitz committed 403c339 on 2955056-limit-submissions
    Issue #2955056 by jrockowitz: Webform field configurtion - limit...
jrockowitz’s picture

StatusFileSize
new21.23 KB

  • jrockowitz committed 830e8a2 on 8.x-5.x
    Issue #2955056 by jrockowitz: Webform field configurtion - limit...
jrockowitz’s picture

Status: Needs review » Fixed

I committed the patch and wrote a change record. Please download the latest dev release to review.

kriboogh’s picture

I tried your solution with the latest dev, but I always get the error the token is invalid.
I added a field with system name field_event_signup_limit and added a settings handler on the webform with:
limit_total: '[webform_submission:node:field_event_signup_limit]'
or
limit_total: '[webform_submission:source-entity:field_event_signup_limit]'

but both give met an invalid token error when trying to save the settings.

jrockowitz’s picture

Are you able to edit the Demo:Event webform handler without any token errors?

You might need to update the latest release of the token module.

kriboogh’s picture

I didn't have the webform_node module enabled. My bad.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

yaach’s picture

I have a similar issue, I am trying to recreate the Event Registration demo. I followed the steps above to create a submission limit on my Event node. Then I added that to the webform handler as explained in #2. The configuration does not work because my limit was 2 but I am still able to submit to the form, in other words, the limit does not work.

yaach’s picture