I am using Metronic 8.2.0 and the sign-up template from demo25 (fancy one).
I want to sent the input data from email and password to my php file where it’s getting checked with the database if email already exists or not. If yes the user should get a modal that he must choose another. If okay the script should open a modal inform about that registration is complete and after clicking goto next page.
I have checked the generaljs from the auth. JavaScript example where all Formular client side error handling will be done.
I am a bit lost how I can realize what I intend to do. Can you give a hint how to realize that?
Hi,
If you are using the latest Metronic 8.x version you can refer to src/js/custom/authentication/sign-in/general.js
and enable handleSubmitAjax
functions instead of handleSubmitDemo
in line number 212 and you can slightly modify handleSubmitAjax
code
The error messages you can display with SweetAlert plugin as it's a more user-friendly and practical way.
Your server-side code should return some JSON data based on what you can show in the error message.
Regards.