Hi,
I have a form built with an input field, called device_id, that has a pre-filled value.
It happens that, if the user doesn’t modify the field, in the submit function the values is empty.
If the user writes something, then the right value is passed.
This is the field of the form:
<ion-input type="text" formControlName="device_id" value="56" required>
</ion-input>
This is the form definition:
this.reportForm = this.formBuilder.group({
device_id: ['', Validators.compose([])
....
If I submit the form without modifying the content of the field device_id:
onSubmit(values) {
console.log('@@ REPORT submit: ', values);
The Chrome console shows:
{device_id: "", msg_text: "dasdasd",...}
How is it possible?
Thank you
cld