Topic: Sending email without reloading page using AJAX

CoryT87 free asked 5 years ago


I'm trying to get my contact page to work so when you fill out the contact form it lets the user know that the email was sent without having to hit the back button to go back to the page. I've followed the steps in the "Contact Form" section and when I copy and paste the information and test it out all I get is:

{"message":"Email successfully sent!","code":1}

I only get this messafge when I use the last php code. If I use the php code before that then I get a "Email sent!" message. According to the website the page is suppose to automatically reload once the user clicks submit. The user shouldn't have to click the back button to get back to the page. Any help would be greatly appreciated!


Bartłomiej Malanowski staff commented 5 years ago

Do you use this one (Ajax version)? https://mdbootstrap.com/docs/jquery/forms/contact/#ajax



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

  • User: Free
  • Premium support: No
  • Technology: General Bootstrap questions
  • MDB Version: -
  • Device: Web
  • Browser: Safari
  • OS: MacOS
  • Provided sample code: No
  • Provided link: Yes