Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: Close Modal after Contact-Form Send

gkondrach pro asked 4 years ago


Expected behavior

I'd like the modal containing the mdb-contact-form to CLOSE when acknowledging the send message.

Actual behavior

The code provided for mdb-contact-form does not consider modals. The obvious feature to close the modal is a hide button which I use (see code "Obvious..."). It must be activated to close the modal after message sent and ack received. (see code "Message..."). In app.component.ts

How would a hide modal feature be added to the ack "Message ..."? I'd appreciate any suggestions or help from community or MDB staff.

Resources (screenshots, code snippets etc.) Obvious Modal Close Feature:

  <button type="button" class="close" data-dismiss="modal" aria-label="Close" (click)="basicModal.hide()">
<span aria-hidden="true">&times;</span>

Message Sent with Acknowledge Button Feature:

  onSubmit() {
    this.connectionService.sendMessage(this.contactForm.value).subscribe(() => {
      alert('Your message has been sent.');
      this.contactForm.reset();
      this.disabledSubmitButton = true;
    }, (error: any) => {
      console.log('Error', error);
    });
  }


Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Opened

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 9.3.1
  • Device: pc, mobile
  • Browser: firefox, chrome
  • OS: linux, FreeBSD
  • Provided sample code: No
  • Provided link: No