118 Posts
webchun
2 years ago
2
Topic

Hi, I'm trying to create an event registration form with limited quota per session, so when the user try to register, they need to choose what session they want to register. Let say there are 2 sessions, Session A and Session B. Each session is limited to 100 participant, so if the participant of Session A is reaching 100, new user will no longer able to select Session A. 

Can anyone tell me how can I do that / best practice for that? Thanks a lot.

Get a Book for SEBLOD
215 Posts
iliil
2 years ago
1
Level 1

HI webchun

Seblod is a great tool exactly for these kinds o things. It would, however, require some  PHP/MySQL skills.

1) The Session content type should have a participant counter filed (INT column in the content type DB table)

2) I assume you have a Select Dynamic Filed in your registration form for selecting the session. You have to update the SQL quoery of the field so it offers only those sessions where the participant counter column is < 100.

3) Use the SEBLOD after sore plugin to increment the participant counter column of the selected session after each user registration.

Hope this helps

Michal

118 Posts
webchun
2 years ago
0
Level 2

Thanks for the help and inspiration Michal :) But I think I will go with some sql + template override way which is seems easier for me 

Get a Book for SEBLOD