When an event fills as an event organizer you want some flexibility on who you would grant the last places from your waitlist to. For our summercamps we take into account if people already have brothers and sisters in our other camps and if the family also booked in the last years.

This means we would like to manually 'grant' the last places to some of the people on our waitlist. Therefore we change the participant status to 'Pending from waitlist' in order for the registrant to finish the registration.

Unfortunately this cannot proceed, because of the 'maximum participants' setting. I would advocate for a setting to be able to override the max.participant setting when people finish their registration.

I do not know which files would be related to this 'maximum check' and what good ways would be to be able to override it.

  • Thinking in another direction: How would I be able to override the $emptySeats setting in CRM/Event/Form/Registration/ParticipantConfirm.php from an extension? Jan 13, 2019 at 7:58
  • Could you just 'reserve' several of the places with fake contacts until you are ready to do your final allocation? Also pls note you should not ask a Question in the Answer section, so either add to original question, as a comment, or make a new Question
    – petednz - fuzion
    Jan 13, 2019 at 23:56
  • Using the buildForm hook (see answer above) Jan 14, 2019 at 18:05

2 Answers 2


Currently we use this as a workaround: In CRM/Event/Form/Registration/ParticipantConfirm.php we manually edit the emptyseats to allow the registration to finish.

//Allow confirmation even when waitlist is still on
$emptySeats = 99
//$emptySeats = CRM_Event_BAO_Participant::pendingToConfirmSpaces($this->_eventId);

In this way the event is still full and new registrations will be on the waitlist. But the people I manually edited to "pending from Waitlist" can finish their registration.

  • Of course we rather be able to make an extension of this, instead of editing core files. But I would not know how to do that and if there would be a hook to use for this purpose. Another scenario: why not just allow 'pending waitlist' people to be able to register. Or: have a setting for this behavior. Jan 22, 2018 at 12:14
  • suggestion #1: add a new setting: "offer waitlist from" (So Max.Participans can be 40 and 'Waitlist threshold' can be 30) suggestion #2: add a new setting: "allow pending waitlist to finish registration" Jan 22, 2018 at 12:26
  • 1
    Richard while you've identified that it's not best practice to patch core files, are you aware that you can keep these modified files in a civix-generated extension? Just copy them to the equivalent path in your extension. Overrides still require review/update at upgrade time - this extension can help you keep track. Jan 13, 2019 at 9:11
  • Thanks for bringing this solution up, I will think about it. It still would not remove the requirement for a manual action during upgrade (which for me now is, edit a core file). I wonder if there would be a hook to use to change the value. Jan 14, 2019 at 10:33
  • If there isn't (yet), you can implement the setting/hook required, then use your modified code from the extension while it makes its way into core via a PR. Jan 14, 2019 at 17:25

If you want to do this in an extension it would depend in where the data would be coming in. If you are using CiviCRM to create an event I would use the buildForm hook (details: https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_buildForm/) to set defaults for the field and set it to read only.

If you are using webform-civicrm and the data is coming in with the API (when an event is created from the website) you could use the apiWrappers hook to override the data coming in (details: https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_apiWrappers/). For the latter approach I have developed an extension that might jumpstart you if you play a little with it: https://lab.civicrm.org/extensions/contactspecificapidefaults.

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.