Here is the code snippet I am currently working with:
I have set default values for the form fields, but when clicking the button, the parent form does not reflect them.
private createFormInstance() {
this.form = this.fb.group({
username: ['test', [Validators.required]],
password: ['test', [Validators.required]],
});
}
When submitting without changing any input fields, I expect to see the default values displayed, but instead, I get null
. Data only shows up if I make changes to the input fields. However, there are cases where I need to submit the form with default values without making any modifications.