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

  • bebef
    Asked on September 30, 2015 at 3: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.onSubmissionDISABLEDerror="jumpToSubmit";

       });

     

    </script>

     

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

  • jonathan
    Replied on September 30, 2015 at 4: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.

    Where to Add the javascript code when using Form Source Code Embed Image 1 Screenshot 20

     

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