Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
How do I set the event capacity?
Ideally, I would like users to be able to enter a number "number of attendees" and have his count against the total event capacity.
Also, how do I display the total number of attendees signed up for an event?
Comments
Comment #1
Pene CreditAttribution: Pene commentedGo to /admin/structure/types/manage/event/fields and there you have to set up a new variable (type: number, widget type: text). My variable's full name for the system is field_event_capacity (important for the below section). If you need it, use mandatory variable.
There you go, a displaying method:
If you are user #1: Get Views PHP module, install, enable.
Go in to your calendar, week etc. view.
Add a PHP field into Fields part.
To the Output code section, insert something like this: