Topic: MDB checkbox causing buttons not to work.
*Expected behavior*The submit action for a button on a form should submit the form including the value of a the mdb-select control bound to a form element.
*Actual behavior*The submit action is not submitting the form using Chrome. No javascript errors or back end console logging for the save() function is occurring when the button is clicked. Other browsers such as Safari 13.0.3 (15608.3.10.1.4) continue to work fine.
<form [formGroup]="registrationForm" (ngSubmit)="save()" *ngIf="registration || newEntity">...<div class="md-form">
<mdb-checkbox formControlName="usingUniquePatientIdentifiers">Using Unique Patient Identifiers
</mdb-checkbox>
</div>...<div> <button type="submit" mdbBtn
size="sm" color="light" mdbWavesEffect>Save</button>
</div>
</form>
mlowejazz
answered a year ago
Issue solved.
The form element had false instead of 'false' in quotes for the default form element value. Now the form submits using Chrome.
Wasn't working
usingUniquePatientIdentifiers: [false, [Validators.required]],
Now working
usingUniquePatientIdentifiers: ['false', [Validators.required]],
Konrad Stępień staff commented a year ago
I am glad that the topic has been resolved.
I will close the issue.
Closed
This topic is closed.
Closed
- User: Free
- Premium support: No
- Technology: Angular
- MDB Version: 8.7.0
- Device: MacBook Pro
- Browser: Chrome Version 80.0.3987.106
- OS: MacOs Catalina 10.15.1 (19B88)
- Provided sample code: No
- Provided link: No
mlowejazz commented a year ago
Correction, mdb-checkbox.