I'm currently facing a challenge while working with the Metronic Starter Kit, specifically regarding form submissions. Typically, I'm accustomed to submitting requests, such as signing up users, through views. However, in the Metronic Starter Kit, JavaScript is employed to handle form submissions.
My specific question is: How can I submit a form using a view, for instance, the AuthSignupView, while still leveraging the features provided by the Metronic Starter Kit, such as error handling associated with the element ID 'kt_sign_up_submit'?
I appreciate any guidance or examples you can provide to help me overcome this hurdle. Thank you in advance for your assistance.
Best regards
Hi,
To submit a form using a view in the Keenthemes Metronic Starter Kit, you need to customize the JavaScript code that handles the form submission. The provided JavaScript file seems to handle both regular form submissions and AJAX form submissions examples. /js/custom/authentication/sign-up/general.js
Update the form selector in the init function to match the ID of your form:
form = document.querySelector("#kt_sign_up_form");
handleForm();
//form.submit();
handleFormAjax();
Thanks so much for your answer!