- Posts: 29
- Thank you received: 4
Select existing Team Name and assign Team Number
- Cory S
- Topic Author
- Offline
- Junior Member
-
Less
More
2 months 1 week ago - 4 days 22 hours ago #175902
by Cory S
Select existing Team Name and assign Team Number was created by Cory S
This plugin, TeamNumberAssignment, and new field type allows event registrants to either join an existing team or create a new team, and auto-assign a team #. Team members who register with the same team name are automatically assigned the same team number. This is event-specific. It should work for fields on both Billing and Registration Group records.
It's comprised of a plugin that you install normally, which takes care of the Team# assignment. It also adds a new SQLCustom field type, which uses SQL to lookup existing values in the database for Team Name. This field is an improvement over the existing SQL custom field because it allows you to add a new value, instead of only selecting from existing values.
Normal disclaimer, use at your own risk, not responsible for any damage caused by using this plugin.
=================
OverviewThis plugin and new field type allows event registrants to either join an existing team or create a new team, and auto-assign a team #. Team members who register with the same team name are automatically assigned the same team number. This is event-specific.
Tested Against: Events Booking 5.3.1, Joomla 5.4.0
Components
Custom Field Type: SQLCustomFile: sqlcustom.php
Location: /administrator/components/com_eventsbooking/libraries/rad/form/field/sqlcustom.php
Type: Events Booking field type extension (NOT a plugin)
Purpose: Provides a dual-input sql-lookup field that:
Plugin Name: Events Booking - Team Number Assignment
Folder: teamnumberassignment
Location: /plugins/eventbooking/teamnumberassignment/
Type: Joomla Plugin (eventbooking group)
Purpose: Automatically assigns team numbers to registrants based on their team name:
- Same team name → Same team number
- New team name → Next available team number (no upper limit)
- Works for both individual and group registrations
- Configurable field IDs for flexibility
How It Works
After Events Booking Updates: Simply reinstall or update this plugin to restore the SQLCustom field type.
Detailed instructions for installing included in the package.
It's comprised of a plugin that you install normally, which takes care of the Team# assignment. It also adds a new SQLCustom field type, which uses SQL to lookup existing values in the database for Team Name. This field is an improvement over the existing SQL custom field because it allows you to add a new value, instead of only selecting from existing values.
Normal disclaimer, use at your own risk, not responsible for any damage caused by using this plugin.
=================
OverviewThis plugin and new field type allows event registrants to either join an existing team or create a new team, and auto-assign a team #. Team members who register with the same team name are automatically assigned the same team number. This is event-specific.
Tested Against: Events Booking 5.3.1, Joomla 5.4.0
Components
Custom Field Type: SQLCustomFile: sqlcustom.php
Location: /administrator/components/com_eventsbooking/libraries/rad/form/field/sqlcustom.php
Type: Events Booking field type extension (NOT a plugin)
Purpose: Provides a dual-input sql-lookup field that:
- Shows a dropdown of existing values for a field (e.g. Team Names) from the SQL query so registrants can choose an existing value
- Provides a text input for entering a new value
- Automatically hides the text input when an existing value is selectedFeatures
- Executes SQL queries to populate dropdown options
- Supports placeholders like [EVENT_ID] in SQL queries
- Syncs dropdown and text input with JavaScript
- Inherits validation and styling from parent RADFormFieldSQL class
Plugin Name: Events Booking - Team Number Assignment
Folder: teamnumberassignment
Location: /plugins/eventbooking/teamnumberassignment/
Type: Joomla Plugin (eventbooking group)
Purpose: Automatically assigns team numbers to registrants based on their team name:
- Same team name → Same team number
- New team name → Next available team number (no upper limit)
- Works for both individual and group registrations
- Configurable field IDs for flexibility
How It Works
- Hooks into onAfterStoreRegistrant event
- Checks that field IDs are configured (shows error if not)
- Retrieves the Team Name from the configured Team Name field
- Checks if team name already exists for this event
- If exists: Assigns the same team number
- If new: Finds the highest existing team number and assigns next number (max + 1)
- Saves team number to the configured Team Number field
- For group registrations: Processes each group member individually
- Assigns team numbers based on each member's team name
- Handles cases where group members have different team names
- Also processes billing record if it has a team name
After Events Booking Updates: Simply reinstall or update this plugin to restore the SQLCustom field type.
Detailed instructions for installing included in the package.
Last edit: 4 days 22 hours ago by Cory S. Reason: cleaned up code format, which is really horrible.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
2 months 1 week ago #175903
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Select existing Team Name and assign Team Number
Thanks Cory for sharing your work back to community
Regards,
Tuan
Regards,
Tuan
Please Log in or Create an account to join the conversation.
Support
Documentation
Information
Copyright © 2026 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.