Prerequisites
Before scheduling matches, you need:1
Create at least two teams
Matches require two different teams (home and away). Navigate to Equipos > Create to add teams.
2
Log in to your account
Match creation and editing require authentication.
Creating a New Match
1
Navigate to the Matches page
From the main navigation menu, select Partidos (Matches).
2
Click 'Crear partido'
Click the Crear partido (Create match) button.
3
Enter match details
Fill in all required fields:
- Fecha y hora (Date and time): Select the match date and time
- Seleccione un Equipo Local (Select Home Team): Choose the home team
- Marcador Local (Home Score): Enter the home team’s score (0-100)
- Seleccione un Equipo Visitante (Select Away Team): Choose the away team
- Marcador Visitante (Away Score): Enter the away team’s score (0-100)
4
Submit the form
Click Crear partido (Create match) to save the match.
The date/time field automatically populates with the current date and time when you open the create form.
Match Field Validation
Date and Time
- Required: Cannot be empty
- Format: Uses HTML5 datetime-local input (YYYY-MM-DDTHH:MM)
- Default: Current date and time
Team Selection
- Home Team (Local): Required selection from dropdown
- Away Team (Visitante): Required selection from dropdown
- Important: The same team cannot be selected for both home and away
Score Validation
Home Score (Marcador Local)
- Required: Cannot be empty
- Type: Must be a number
- Range: Between 0 and 100 (inclusive)
- Default: 0
Away Score (Marcador Visitante)
- Required: Cannot be empty
- Type: Must be a number
- Range: Between 0 and 100 (inclusive)
- Default: 0
Team Selection Interface
The match creation form includes intelligent team selection:How It Works
- Initial State: Both dropdowns show all available teams
- Select Home Team: The selected team is hidden from the away team dropdown
- Select Away Team: The selected team is hidden from the home team dropdown
- Change Selection: Previously hidden teams become available again
Technical Implementation
Technical Implementation
The form uses JavaScript to dynamically hide/show options based on your selections:This ensures you can’t accidentally schedule a match where a team plays against itself.
Viewing Matches
The matches list displays:- Match date and time
- Home team (Local)
- Home score
- Away team (Visitante)
- Away score
- Action buttons (Detail, Edit, Delete)
Editing a Match
1
Locate the match
Find the match you want to edit in the matches list.
2
Click 'Editar'
Click the Editar (Edit) button for that match.
You must be logged in to see this button.
3
Update match details
Modify any of the following:
- Date and time
- Home team
- Home score
- Away team
- Away score
4
Save changes
Click Editar partido (Edit match) to save your changes.
Edit Validation
When editing a match:- All validation rules still apply
- You cannot create a duplicate (same teams and date/time)
- The smart team selection still prevents selecting the same team twice
- Scores must remain within the 0-100 range
Deleting a Match
1
Ensure you're logged in
Authentication is required to delete matches.
2
Locate the match
Find the match you want to delete in the list.
3
Click 'Eliminar'
Click the Eliminar (Delete) button.
4
Confirm deletion
Confirm the action when prompted.
Matches can typically be deleted without complex dependencies, unlike teams which may have players and matches associated with them.
Viewing Match Details
To see complete match information:- Click the Detalle (Detail) button for any match
- This displays all match data including teams, scores, and date/time
- Available to all users without authentication
Common Scenarios
Scheduling a tournament
Scheduling a tournament
To schedule multiple matches:
- Create all matches with their scheduled date/time
- Initially set scores to 0-0
- After each match is played, edit the match to update the final score
- Use different date/times for each match
Recording match results
Recording match results
For matches that have been played:
- Find the scheduled match in the list
- Click Editar
- Update the Marcador Local and Marcador Visitante fields
- Save the changes
Rescheduling a match
Rescheduling a match
To change a match date:
- Edit the match
- Update the Fecha y hora field to the new date/time
- Ensure the new date/time doesn’t create a duplicate
- Save
Swapping home and away teams
Swapping home and away teams
If you need to change which team is home/away:
- Edit the match
- Select the new home team from Equipo Local
- Select the new away team from Equipo Visitante
- Swap the scores if they’ve already been recorded
- Save
Troubleshooting
Error: Match already exists
Error: Match already exists
This means a match with the same home team, away team, and exact date/time already exists.Solutions:
- Change the date/time
- Select different teams
- Check if this is a duplicate entry
Cannot create matches - not enough teams
Cannot create matches - not enough teams
The application shows an alert: “Primero se deben crear minimos 2 Equipos antes de crear Partidos”Solution: Click “Crear Equipos” to create at least 2 teams before scheduling matches.
Cannot select different teams
Cannot select different teams
If both team dropdowns seem to show the same team:
- Refresh the page
- Select a home team first
- The JavaScript should automatically hide that team from the away dropdown
Score validation error
Score validation error
Ensure your scores:
- Are between 0 and 100
- Contain only digits
- Are not empty
- Are realistic for soccer/football (typically 0-10)
Date/time not saving correctly
Date/time not saving correctly
Make sure:
- The browser supports HTML5 datetime-local input
- You’ve selected both a date AND a time
- The format is correct (YYYY-MM-DDTHH:MM)
Best Practices
Match Data Relationships
Understanding how matches relate to teams:- Each team has a list of PartidosLocal (matches where it’s the home team)
- Each team has a list of PartidosVisitante (matches where it’s the away team)
- When you delete a team, all associated matches must be handled first
- A single match creates relationships with two teams (home and away)
Related Guides
- Managing Teams - Create and manage teams that play in matches
- Managing Players - Manage the players on your teams
- User Roles and Authentication - Understand who can create and edit matches