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.


  • Profile Image

    Ajax Submission of forms with products bugs?

    Asked by godavid33 on June 04, 2014 at 06:57 PM

    So I thought I was going crazy initially, but I'll start from the beginning.

     

    I am trying to use the source code of a form in order to create a form that accepts payment for a product and submits the form asynchronously so the user doesnt have to leave the site. 

    Easy enough right?

    Wrong.

     

    When I submit the form, some terrible yeti seems to come along and cleave everything in two. Two equal parts that is. Said data yeti is also magical. The user is double charged for the product. 

     

    Now I have narrowed it down to something in the actual process of ajax submission. To deduce this, I tried submitting the form (as unmodified source code) both ajax and with the normal redirect process. The latter worked correctly, the former was yet again terrorized by Mr. Data Yeti. I also have another form on the page, but I deleted it to make sure it wasn't causing a problem. Lo and behold, it was not. It seems that the problem is not that I initially modified the code or that there was a second form. 

     

    Any advice on this? If you could explain a bit about how product data is actually passed from the form to y'alls servers, that could possibly help a lot. The form is not double submitting, it just seems to be getting the actual product information incorrectly. 

     

    Gabe

     

    P.S. I included a link to the page, but it is still under development. If it doesnt take you directly to the registration page, you'll have to just click there from the header menu.

    bugs create a form problem source product
  • Profile Image

    Answered by godavid33 on June 04, 2014 at 07:11 PM

    And of course, once I ask on the forums I figured out the problem. I was initially using $.ajax

     

    I noticed the header method "GET" was being used, as opposed to "POST", even though I told it to use "POST". At any rate, I changed it to $.post and voila, yeti defeated. 

  • Profile Image

    Answered by godavid33 on June 04, 2014 at 07:12 PM

    Feel free to make this post public (but please remove my website) in case others find themselves in dire need of yeti slaying

  • Profile Image
    JotForm Support

    Answered by ashwin_d on June 05, 2014 at 12:07 AM

    Hello godavid33,

    Thank you for the detailed explanation. 

    I have made the thread public and also removed your website information.

    Thank you!