Answers for "html form post disabled fields"

0

how to fix input field and disabled

<input type="text" readonly="readonly" />
Posted by: Guest on February-07-2020
0

form control adding disabled and validators

value: string;
isDisabled: boolean;
//isDisabled and value come from your dynamic data.  
fb: FormBuilder;
myGroup: FormGroup;

this.myGroup = fb.group({
   form_control_name: new FormControl({
      value: this.value,
      disabled: this.isDisabled,
      Validators.required)}
   );
Posted by: Guest on August-14-2020

Browse Popular Code Answers by Language