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

    Is it possible to press a button on my form that executes a javascript to populate a field value on a jotform form?

    Asked by Advolink1 on March 11, 2017 at 07:54 PM

    I do not have the form built as of now, as I am mulling over my options to accomplish the question I am asking.



  • Profile Image
    JotForm Support

    Answered by Welvin on March 12, 2017 at 06:40 AM

    You can trigger a field to populate another field in the form. You just need to conditionally do it. Here's our guide:


    As for the button, you can use our checkbox/radio button field then add a custom CSS codes to make it look like a button.

    Example: https://www.jotform.com/70702313384954.


  • Profile Image

    Answered by Advolink1 on March 16, 2017 at 06:29 AM

    Thank you, Welvin, for your answer.  However, my form will be used side-by-side with data derived from a website.  I need to pass the website derived data to my jotform.  I have screen-scraped the information and believe I need to execute a Javascript to place the website data in my jotform form.

    Any advise on how to execute a javascript and/or obtain the externally derived values and place on jotform form?



  • Profile Image
    JotForm Support

    Answered by Welvin on March 16, 2017 at 08:37 AM

    You can download the form source codes: https://www.jotform.com/help/104-How-to-get-the-Full-Source-Code-of-your-Form. You can then add the script in the source codes. However, you cannot import back the modified source codes in the form builder, so you will need to embed it that way. 

    Note that the changes in the form builder are not automatically shown in the form source so it is recommended to finish the form first.

    Let us know if you need further assistance.