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) »
  • Limit Number of Online Registration "Register multiple participants"
Pages: [1]

Author Topic: Limit Number of Online Registration "Register multiple participants"  (Read 2940 times)

zoomlanski

  • I’m new here
  • *
  • Posts: 10
  • Karma: 0
    • Paramedic Competition
Limit Number of Online Registration "Register multiple participants"
December 05, 2010, 05:49:55 pm
Greetings,

I have selected "Register multiple participants?" in the configure event online Registration.

It creates a drop down box for 10 participants.

Is it possible to limit the drop down box to 4?

Explanation: Creating an Competition Registration.
Teams are 4 people, 2 competitors, 2 judges. So I only need to collect profile data for 4 participants.

Thank you
Tim S

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: Limit Number of Online Registration "Register multiple participants"
December 05, 2010, 07:04:37 pm

You can use the hook_civicrm_buildForm and set the number of additional participants to 3 (+ the main registrant)

check:

http://en.flossmanuals.net/CiviCRM/DevelopIntro
http://wiki.civicrm.org/confluence/display/CRMDOC32/CiviCRM+hook+specification

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

zoomlanski

  • I’m new here
  • *
  • Posts: 10
  • Karma: 0
    • Paramedic Competition
Re: Limit Number of Online Registration "Register multiple participants"
December 05, 2010, 08:33:43 pm
Thank you for the guiding light

I've accomplished some of the steps
- built the directory
- created the file
- put the default code in a file civicrmhooks...

Where does one find the code to replace the form info?
From my page source code @ http://test.paramediccompetition.ca/register/competition-registration  ??

?? $formname?
?? $defaults



/**
 * Set a default value for an event price set field.
 */
example_civicrm_buildForm($formName, &form) {
  if ($formName == 'CRM_Event_Form_Registration_Register') {
    $defaults['price_3'] = '710';
    $form->setDefaults($defaults);
  }
}
 }





zoomlanski

  • I’m new here
  • *
  • Posts: 10
  • Karma: 0
    • Paramedic Competition
Re: Limit Number of Online Registration "Register multiple participants"
December 06, 2010, 09:08:52 pm
Everytime I upload the civicrmhooks.php file, it doesn't run

It shows the contents in the Admin window and "loads"

Attached screen shot and the civicrmHooks.php as a text file.

Guidance is appreciated,
Thanks
Tim

John.K

  • I post occasionally
  • **
  • Posts: 75
  • Karma: 5
  • CiviCRM version: 4.x
  • CMS version: Drupal 7
  • MySQL version: 5.x
  • PHP version: 5
Re: Limit Number of Online Registration "Register multiple participants"
March 11, 2014, 08:15:28 am
I would like to note this as a feature request - ie: to be able to set the maximum number of additional participants through the admin GUI. Is it OK to create an issue for it in the tracker?

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: Limit Number of Online Registration "Register multiple participants"
March 11, 2014, 02:13:35 pm

you can post it in the feature requests and suggestions board

if you are willing to work on it and submit a patch that implements it, then please go ahead and create an issue and attach your PR to the issue

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

John.K

  • I post occasionally
  • **
  • Posts: 75
  • Karma: 5
  • CiviCRM version: 4.x
  • CMS version: Drupal 7
  • MySQL version: 5.x
  • PHP version: 5
Re: Limit Number of Online Registration "Register multiple participants"
March 20, 2014, 02:11:12 am
A feature request follow-up is here: http://forum.civicrm.org/index.php/topic,31955.0.html

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Limit Number of Online Registration "Register multiple participants"

This forum was archived on 2017-11-26.