Seleccionar Cita Page (seleccionar-cita.html)
The “Seleccionar Cita” (Select Appointment) page is the core of the appointment booking system, featuring a comprehensive form where users provide their information and select their appointment details.Purpose
This page serves to:- Collect user identity information
- Verify DNI/NIE document details
- Allow users to select appointment location and time
- Gather contact information for notifications
- Ensure users understand terms and conditions
Form Structure
The page contains a single comprehensive form with multiple sections:The form uses
method="get" for demonstration purposes. In production, this should be method="post" with proper server-side validation and CSRF protection.Form Sections
1. Tipo de Trámite (Type of Procedure)
Purpose: Determine which documents the user needsAvailable Options
Available Options
- Expedición/Renovación DNI: Issue or renew National ID only
- Expedición/Renovación Pasaporte: Issue or renew Passport only
- Expedición DNI y Pasaporte: Issue or renew both documents simultaneously
2. Datos del DNI (DNI Data)
Purpose: Verify current document informationField Descriptions
Field Descriptions
Número de DNI:
- Format: 8 digits + 1 letter (e.g., 12345678X)
- Validation: Pattern
[0-9]{8}[A-Za-z] - Required: Yes
- The code of the equipment that issued the current DNI
- Found on the physical DNI card
- Required: Yes
- Expiration date of current DNI
- Input type: date picker
- Required: Yes
- Support number from the DNI card
- Alphanumeric identifier
- Required: Yes
3. Datos de la Cita (Appointment Data)
Purpose: Select appointment location and timeLocation Selection
Location Selection
Province Selection:
- Available provinces: Madrid, Barcelona, Valencia, Sevilla, Bilbao, Málaga, Murcia, Las Palmas, Valladolid, Córdoba
- Drives the office selection dropdown
- Currently shows Bilbao area offices as example:
- Bilbao - Centro
- Getxo
- Barakaldo
- Should dynamically populate based on selected province
In production, the office dropdown should be dynamically populated via JavaScript based on the selected province.
Time Selection
Time Selection
Available Time Slots:Morning:
- 09:00, 09:30, 10:00, 10:30, 11:00, 11:30, 12:00, 12:30
- 16:00, 16:30, 17:00, 17:30, 18:00
4. Datos de Contacto (Contact Data)
Purpose: Enable communication and additional information collectionMotivo de Renovación (Reason for Renewal)
Renewal Reasons
Renewal Reasons
- Caducidad del documento: Document expiration (most common)
- Pérdida o sustracción: Loss or theft
- Deterioro del documento: Document damage
- Otros motivos: Other reasons
Terms and Conditions
- First checkbox is required - users must accept terms
- Second checkbox is optional - opt-in for communications
Form Actions
Information Section
Critical Reminders:
- Data must match current DNI exactly
- Confirmation code will be provided
- Appointments are personal and non-transferable
- Punctuality is required
User Flow
Validation
Client-Side Validation
HTML5 Validation Attributes:Field Requirements
| Field | Type | Required | Validation |
|---|---|---|---|
| Tipo de trámite | Select | Yes | Must select option |
| Número DNI | Text | Yes | Pattern: 8 digits + letter |
| Equipo expedición | Text | Yes | - |
| Fecha validez | Date | Yes | Valid date |
| Número soporte | Text | Yes | - |
| Provincia | Select | Yes | Must select option |
| Oficina | Select | Yes | Must select option |
| Fecha cita | Date | Yes | Valid date |
| Hora cita | Select | Yes | Must select time |
| Yes | Valid email format | ||
| Teléfono | Number | Yes | - |
| Observaciones | Textarea | No | - |
| Motivo | Radio | Yes | One must be selected |
| Acepto términos | Checkbox | Yes | Must be checked |
| Acepto política | Checkbox | No | - |
Visual Design
Layout Structure
- Section-based: Form divided into logical sections with icons
- Two-column layout: Fields arranged in rows (
campos-fila) - Responsive: Adapts to single column on mobile
- Visual hierarchy: Clear headings with SVG icons
Styling
CSS files:style.css- Base stylesheaderfooter.css- Header and footerseleccionar-cita.css- Form-specific styling
Technical Implementation
Form Configuration
- Action: Submits to
resumen.html - Method: GET (should be POST in production)
- ID:
formulario-citafor JavaScript targeting
JavaScript Enhancement
Includesindex.js which likely handles:
- Province-office dependency
- Date validation (no past dates)
- Available time slot filtering
- Form submission handling
Accessibility Features
- Proper label-input associations using
forattribute - Required fields marked with
requiredattribute - Placeholder text providing format examples
- Clear error messages via HTML5 validation
- Semantic form structure
- Keyboard navigation support
Security Considerations
Important: The following security measures should be implemented in production:
- Use POST instead of GET for sensitive data
- Implement CSRF tokens
- Server-side validation for all fields
- Sanitize all inputs
- Encrypt data transmission (HTTPS)
- Rate limiting to prevent abuse
- CAPTCHA for bot prevention
Related Pages
- Iniciar Solicitud - Previous page
- Resumen - Next page (form submission destination)
- Home - Return to start