Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

Django - Authentication Pages


Hello. I am using the django starter kit. I am having issues with the code base. Looking at the JS code it has the submit form commented out, however I can only get it to POST the data if I uncomment that part and remove the:


// Show message popup. For more info check the plugin"s official documentation: https://sweetalert2.github.io/
Swal.fire({
text: "You have successfully reset your password!",
icon: "success",
buttonsStyling: false,
confirmButtonText: "Ok, got it!",
customClass: {
confirmButton: "btn btn-primary"
}
}).then(function (result) {
if (result.isConfirmed) {
form.reset(); // reset form
passwordMeter.reset(); // reset password meter
//form.submit();

//form.submit(); // submit form
var redirectUrl = form.getAttribute("data-kt-redirect-url");
if (redirectUrl) {
location.href = redirectUrl;
}
}
});
},

part of the code. How can I get this to POST the data but keep that part of the JS file intact as I am unsure as to POST the data by just uncommenting the

//form.submit();

part of the code. Also should I uncomment both form.submit lines? Hope you can help me work this out!


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (1)


Hi Luke Hayes,

The code parts are just for the simulation. The actual form process needs to be customized. At the moment, we do not have an example for the form. In the future, we will include the form demos.

You can reuse the JS script to get started. form.submit() should submit the form data to the action URL set in the <form> tag.

Thanks


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(