Disable Input fields in reactive form

后端 未结 16 1049
暖寄归人
暖寄归人 2020-12-22 20:28

I already tried to follow the example of other answers from here and I did not succeed!

I created a reactive form (ie, dynamic) and I want to disable some fields at

16条回答
  •  無奈伤痛
    2020-12-22 20:51

    If to use disabled form input elements (like suggested in correct answer how to disable input) validation for them will be also disabled, take attention for that!

    (And if you are using on submit button like [disabled]="!form.valid"it will exclude your field from validation)

提交回复
热议问题