How do I do a custom AJAX form response?

1 reply · opened May 5, 2019

VvoidnadamasMay 5, 2019

I am modifying the http://themes.semicolonweb.com/html/canvas/forms-fitness.html AJAX form. That form redirects to "include/form.php", which sends an AJAX response rather than redirect to another page. Instead of that PHP page I'd like to have the JSON response come from my webapp as I do some other things with the form. When I change to 'action="/myresponse"' I get redirected to /myresponse on form submission rather than an AJAX response. What am I doing wrong? /myresponse returns the same JSON message as "include/form.php"

SSemicolon WebSTAFFMay 6, 2019

Hello,

This should work fine by default if you follow the JSON Structure from the include/form.php File.

Additionally, please provide us with a Live URL so that we can check out the exact issue and provide you with more assistance on this. Thanks for your Patience.

Meanwhile, do let us know if we can help you with anything else or if you find any further issues with Canvas.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard