Hey there, late night folks! I have a quick question about Angular. I'm working with a form that includes a specific field where I set the value using patchValue, but I also need to disable this field. The issue is that after disabling it, the value is no longer being sent to the backend for insertion. I ran some tests and found out that when I use patchValue only, the value gets sent and inserted into the backend properly. However, when I disable the field, the value is lost and not sent to the backend. I've tried using onlySelf but didn't succeed. I would really appreciate your help on this matter. Thank you in advance! Also, I'm aware that HTML disable works, but I'm wondering if there's a way to achieve this in TypeScript by disabling the field in the form.
startRegistrationProcess(){
if(this.viewing){
this.searchForm.controls['address'].patchValue(Address.ACTIVE);
this.searchForm.controls['address'].disable({onlySelf: true});
}
}