What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.
We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.
Submitting data to JotForm servers through Angular JS code instead of default submission processAsked by SixPlus on March 08, 2016 at 12:31 PM
I am using Angular and I am using the source code for the jotform to handle form submissions. The ngClick (or ngSubmit) event in Angular conflicts with the form action. Ideally, I would like to just submit the POST request to the jotform URL contained within the action attribute of the form, while handling the rest of my business logic. This would also allow me to preserve the single-page-application nature of our website because I can redirect to another page on our site by preventing the event default page refresh.
If i were to take out the form action attribute, does the form action link receive JSON data and could you outline how to structure this data as an HTTP request body so I can just handle the form action myself through Angular?
In general if you submit the data as it is submitted through the general POST method, it will work properly, but if you wish, you can - and in this case might be more desirable - submit the data through the API.
You can see more about this here: http://api.jotform.com/docs/#post-form-id-submissions
It will show you how to post the data through the POST to your specific form. You could alternatively use PUT instead of POST if you prefer.