Topic: MDB checkbox causing buttons not to work.

mlowejazz priority asked 4 years ago


*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 priority commented 4 years ago

Correction, mdb-checkbox.


mlowejazz priority answered 4 years 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 4 years ago

I am glad that the topic has been resolved.

I will close the issue.


FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Closed

Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB 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