Client Registration
The client registration form is the first step in the ITV inspection workflow. This form captures essential customer information before generating vehicle inspection forms.Overview
The client registration form collects basic information about the customer and the number of vehicles they need to inspect. All fields are required and include real-time validation to ensure data accuracy.Form Fields
The registration form includes the following fields:Enter Client Name
Fill in the Nombre (Name) field with the client’s first name.
- Field ID:
nombre - Type: Text input
- Validation: Required, auto-capitalizes first letter
- Placeholder: “Ingrese su nombre”
Enter Client Surname
Fill in the Apellidos (Surname) field with the client’s last name(s).
- Field ID:
apellidos - Type: Text input
- Validation: Required, auto-capitalizes first letter
- Placeholder: “Ingrese sus apellidos”
Enter Business Name
Fill in the Razón Social (Business Name) field with the company name or “Particular” for individual clients.
- Field ID:
razonSocial - Type: Text input
- Validation: Required, auto-capitalizes first letter
- Placeholder: “Empresa o particular”
Specify Number of Vehicles
Enter the Nº de Vehículos (Number of Vehicles) that need inspection.
- Field ID:
nAutos - Type: Numeric input
- Validation: Required, 1-50 vehicles allowed, numbers only
- Placeholder: “Cantidad de vehículos”
The system supports inspections for up to 50 vehicles per client. If you enter a number greater than 50, it will automatically be limited to 50.
Generate Vehicle Forms
Click the “Generar Formularios” (Generate Forms) button to create individual inspection forms for each vehicle.
- Button ID:
enviar - Function:
enviar() - Effect: Validates all fields and generates dynamic vehicle forms
Field Validation
The system performs automatic validation to ensure data quality:Real-Time Validation
- Auto-Capitalization: The first letter of nombre, apellidos, and razonSocial fields is automatically capitalized
- Numeric Input: The nAutos field only accepts numeric values (0-9)
- Range Validation: Number of vehicles must be between 1 and 50
Submit Validation
When clicking “Generar Formularios”, the system checks:Error Messages
The system displays styled error notifications for validation issues:- Missing Required Fields: “Por favor, complete todos los campos obligatorios.”
- Invalid Vehicle Count: “Por favor, ingrese un número válido de vehículos (1-50).”
- Exceeding Maximum: “El número máximo de vehículos es 50.”
User Experience Features
Auto-Complete Behavior
- Names and surnames automatically capitalize the first letter as you type
- Numeric field prevents non-numeric input
- Tab navigation follows logical field order
Visual Feedback
- Loading animation appears when generating forms
- Button displays ”⏳ Generando formularios…” during processing
- Button is temporarily disabled during form generation to prevent duplicate submissions
Next Steps
After successfully completing client registration:- Individual vehicle forms will be generated based on the number specified
- You can proceed to fill out vehicle inspection details for each vehicle
- The original registration form will remain visible for reference
Technical Reference
The registration form is defined inindex.html:31-56 and processed by the enviar() function in script.js:8-39.
Key functions:
enviar()- Main form submission handlerobtenerDatosCliente()- Retrieves client data objectinicializarEventos()- Sets up real-time validationmostrarError()- Displays error notifications