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

    How can I create/add custom javascript to a form to calculate fields?

    Asked by ericbojo on April 22, 2013 at 06:18 PM

    I want to have a form Calculate a value based on 2 fields.   For this i need to add custom javascript to the form to  multiply and divide 2 field values and then insert that value into a new field.  How can I add my custom javascript to  the form?

    Page URL:
    http://form.jotform.us/form/31114929324147

    create custom javascript
  • Profile Image

    Answered by falkirks on April 22, 2013 at 06:55 PM
    You can download the complete source code of the form using the embed tab.
    Then make the customizations required.
  • Profile Image
    JotForm Support

    Answered by abajan on April 22, 2013 at 07:39 PM

    @ericbojo

    Do you already have a script, or would you like assistance with that?

  • Profile Image

    Answered by ericbojo on April 22, 2013 at 07:56 PM

    Oh, I already have the basic script written. Its good I can download it and use it on my site since i prefer using jQuery when possible

  • Profile Image
    JotForm Support

    Answered by jonathan on April 22, 2013 at 11:25 PM

    @ericbojo

    Hi,

    Try this steps.

    1. Download your form's source code.

    2. Embed/Add the form using source code to your website page.

    3. Add your script to that same page where the form was embedded.

    Example page (this is from Abajan's old sample page)

    Put numbers on "Chicken" or "Mutton Briyani" field and you will see the "total" field calculates

    ---

    You can view the source of this page and you will see the javascript code part at the bottom.

     

    Hope this help. Inform us if you need further assistance.

    Thanks.

  • Profile Image

    Answered by designer47 on September 21, 2016 at 09:24 AM

    how to disable a button in my form ?

  • Profile Image
    JotForm Support

    Answered by Jan on September 21, 2016 at 10:52 AM

    @designer47

    This is a duplicate post. I can see that you already opened your own thread. Please refer to that thread, here's the link: https://www.jotform.com/answers/937951.

    Thank you.