I have a form in angular in which I want the characters to be displayed and stored in uppercase for which I have this function inside the input attributes
<input type="text" placeholder="Ingrese los nombres del deudor" class="input is-small"
#inputNombreRazon (input)="inputNombreRazon.value=$event.target.value.toUpperCase()"
formControlName="DEUDOR_NOMBRES_APELLIDOS" tabindex="4">
The downside is that when the data is retrieved, the last character is lowercase.
Does anyone know what is causing this peculiarity?
Below is the constructor for my form.
this.deudorSolidarioForm = this.formBuilder.group({
tipo_solicitante_deudor: ['', Validators.required],
tipo_persona_deudor: [{value: ''}],
DEUDOR_TIPO_DOCUMENTO: ['', Validators.required],
DEUDOR_NO_IDENTIFICACION: ['', [Validators.required, Validators.maxLength(15)]],
DEUDOR_NOMBRES_APELLIDOS: ['', Validators.required],
nombres_representante_legal: [''],
apellidos_representante_legal: [''],
DEUDOR_EMAIL: ['', Validators.required],
DEUDOR_TELEFONO: ['', Validators.required],
});
You're on the right track, but try this line to get the desired result:
Replace this: