Documentation Index
Fetch the complete documentation index at: https://mintlify.com/emmanueljarquin-sys/GrupoMecsaCMS/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The Contacts module stores and manages contact form submissions from your website. Track inquiries with country, phone, and email information for follow-up and customer service.Key Features
Contact Submissions
Receive and store contact form data
Country Validation
Validate contacts against country database
Pagination
Browse contacts with configurable page sizes
CRUD Operations
View, create, update, and delete contact records
Contact Record Structure
Each contact submission includes:- Country (
pais): Contact’s country - Phone (
telefono): Contact phone number - Email (
correo): Contact email address - Created At: Submission timestamp
Creating a Contact
Fill Contact Information
Required fields:
- Country (
pais): Select from dropdown - Phone (
telefono): Contact phone number - Email (
correo): Valid email address
Contact Creation Process
contactos.php
Country Validation
Contacts must specify a valid country from thePaises table:
contactos.php
Countries Table
Table Name:Paises
| Column | Type | Description |
|---|---|---|
id | integer | Primary key |
pais | text | Country name |
The system validates that the submitted country exists in the
Paises table before accepting the contact.Fetching Contacts
Contacts are retrieved with pagination:contactos.php
Pagination Configuration
- Default rows per page: 10
- Options: 5, 10, 20, 50
- URL parameters:
?page=2&rowsPerPage=20
Contact Listing
Contacts are displayed in a table with:- Country: Contact’s country
- Phone: Formatted phone number
- Email: Email address (clickable mailto link)
- Received: Submission date and time
- Actions: Edit and delete buttons
Default Sorting
Contacts are sorted by creation date in descending order (newest first):Viewing Contact Details
Click on a contact row to view full details:- All contact information
- Submission timestamp
- Related inquiries (if tracked)
- Follow-up history (if enabled)
Editing Contacts
Deleting Contacts
To delete a contact:- Click the delete button
- Confirm the deletion
- Contact record is permanently removed
Database Table
Table Name:contactos
| Column | Type | Description |
|---|---|---|
id | integer | Auto-incrementing primary key |
pais | text | Country name |
telefono | text | Phone number |
correo | text | Email address |
created_at | timestamptz | Submission timestamp |
API Endpoints
The Contacts module uses Supabase REST API:- GET
/rest/v1/contactos- List all contacts - GET
/rest/v1/contactos?select=*&order=created_at.desc&limit=10&offset=0- Paginated contacts - POST
/rest/v1/contactos- Create new contact - PATCH
/rest/v1/contactos?id=eq.{id}- Update contact - DELETE
/rest/v1/contactos?id=eq.{id}- Delete contact
Dashboard Integration
Contact statistics appear on the Dashboard:dashboard.php
- Total contact count
- Recent contact submissions (last 5)
Email Integration
Contact emails can be exported for email marketing campaigns:Best Practices
Timely Follow-up
Respond to new contacts within 24 hours
Data Privacy
Comply with GDPR and data protection regulations
Regular Review
Audit contacts monthly to remove duplicates
Categorization
Tag contacts by inquiry type for better organization
Troubleshooting
Invalid Country Error
Problem: “País no válido” error when creating contact Solution: The submitted country must exist in thePaises table. Check the countries dropdown or add the country to the Paises table first.
Missing Required Fields
Problem: “Completa todos los campos” error Solution: Ensure all three required fields (country, phone, email) are filled before submitting.Duplicate Contacts
Problem: Same contact submitted multiple times Solution: Consider implementing duplicate detection based on email address. Add a unique constraint on thecorreo column:
Form Integration
To integrate the contact form on your website:Next Steps
Dashboard
View contact statistics
Email Builder
Send campaigns to contacts