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

    Where to Add the javascript code when using Form Source Code Embed

    Asked by bebef on September 30, 2015 at 03:57 PM
    Where exactly to paste this code of yours of the start of this article? Do I have to paste that code in the embed code under this line? I delete the submit button, hopping to auto submit with your code above.

    This is in the embed code, telling me that I don't have a submit button. Now, Do I have to delete this piece of script and to change it with the one you write above? 

     

    <script type="text/javascript">

       JotForm.init(function(){

          $('input_1').rating({stars:'5', inputClassName:'form-textbox', imagePath:'//d2g9qbzl5h49rh.cloudfront.net/images/stars.png', cleanFirst:true, value:''});

    JotForm.clearFieldOnHide="disable";

    JotForm.onSubmissionError="jumpToSubmit";

       });

     

    </script>

     

     Where exactly to put your code above? Please, I am not a proggramer, I understand very hard. Thanks

    script code full source auto submit source embed javascript
  • Profile Image
    JotForm Support

    Answered by jonathan on September 30, 2015 at 04:11 PM

    We will be able to provide you with the appropriate suggestion if you can share to us the URL of your website where you used the source code embed of the form.

    Usually, the javascript code can be added on the website page where the form was embedded, within the Head tag of the page.

    Here is a test website page where I have embedded the form source code. If you view the source of the page, you will see the added javascript codes and as well as the form's source embed code.

     

    Hope this help. Let us know how we can be of further assistance.