CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Increase Number of Multiple Registrations
Pages: [1]

Author Topic: Increase Number of Multiple Registrations  (Read 1092 times)

nessnzoe

  • I post occasionally
  • **
  • Posts: 84
  • Karma: 2
    • GingerFeet LLC
  • CiviCRM version: 3.4.8
  • CMS version: Drupal 6.22
  • MySQL version: 5.1.14
  • PHP version: 5.3.6
Increase Number of Multiple Registrations
February 15, 2011, 04:33:10 pm
Hi all,

Have checked through the forums and not sure if I'm just missing something.

Is there any way to increase the number of multiple registrations from 10 to something else? We have a client who has an outer marker of 16 (participants) for one of the levels of their price set.

Is there any way to do this through the event configuration interface?

Thanks,
Vanessa

Rajan Mayekar

  • I post frequently
  • ***
  • Posts: 177
  • Karma: 20
    • Rajan's Blogs
Re: Increase Number of Multiple Registrations
February 15, 2011, 08:26:04 pm
On event registration max additional participants considered as 10, you may increase additional participants by implementing hook_civicrm_buildForm

here is an example for you
Code: [Select]
function yourmodulename_civicrm_buildForm( $formName, &$form )
{

    if ($formName == 'CRM_Event_Form_Registration_Register' && $form->elementExists('additional_participants') ) {

        $addParticipants = &$form->getElement('additional_participants');
     
        // we can add more options as
        $addParticipants->addOption( ts('11'), 10 );
        $addParticipants->addOption( ts('12'), 11 );
    }

}

Also Now civicrm supports, number of participant count and maximum participant count for each field option of price set.

Hope this will solve your problem :)

nessnzoe

  • I post occasionally
  • **
  • Posts: 84
  • Karma: 2
    • GingerFeet LLC
  • CiviCRM version: 3.4.8
  • CMS version: Drupal 6.22
  • MySQL version: 5.1.14
  • PHP version: 5.3.6
Re: Increase Number of Multiple Registrations
February 16, 2011, 11:26:17 am
Hi Rajan,

Yes, this answers the question.

We'll try it out.

Thanks!
Vanessa

spikyjt

  • I’m new here
  • *
  • Posts: 9
  • Karma: 0
Re: Increase Number of Multiple Registrations
April 06, 2011, 03:34:45 am
Thanks for this, it took me a while to find this solution.

I tweaked the code to make it a bit more robust - it gets a bit cumbersome if you want to increase the number significantly. The following makes it very simple to adjust and future proofs it if the core code increases the default number:

Code: [Select]
function yourmodulename_civicrm_buildForm( $formName, &$form )
{
if ($formName == 'CRM_Event_Form_Registration_Register' && $form->elementExists('additional_participants') )
{
// set this to the maximum number of participants you wish to allow
$numberParticipants = 50;

$additionalParticipants = &$form->getElement('additional_participants');
$currentExtraParticipants = count($additionalParticipants->_options);
while ($currentExtraParticipants < $numberParticipants)
{
$value = $currentExtraParticipants;
$currentExtraParticipants++;
$additionalParticipants->addOption(ts(strval($currentExtraParticipants)), $value);
}
}
}

spikyjt

  • I’m new here
  • *
  • Posts: 9
  • Karma: 0
Re: Increase Number of Multiple Registrations
April 17, 2011, 03:33:39 am
Be careful how high you set the maximum number of participants. If you set it too high, it will cause out of memory errors, unless you allow huge memory allocation to your php processes. This is because the confirmation email has a PDF attachment generated (entirely unnecessarily in my opinion), which is very costly.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Increase Number of Multiple Registrations
April 17, 2011, 07:56:48 am

How high would you typically set it that makes the PDF attachment an issue?

We do think that the PDF attachment is a good addition. However it would be even better if it was optional. Any chance you can investigate and contribute a patch. We can help out on IRC

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Increase Number of Multiple Registrations

This forum was archived on 2017-11-26.