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

    Widget to seach and display value from google spreadsheet.

    Asked by gillmantisnetworks on June 28, 2017 at 02:33 AM

    Hi

    I would like to develop a widget that allows the user to enter a registration number, looks up the corresponding company name off a Google sheet and then displays the company name on the JotForm before the form is submitted.

    (I think I can figure out the Google Sheet lookup bit). I just want to know if it is possible (and how) to display the company name before submission.

    Thanks

    Gill

    Currently my code is:

    <!DOCTYPE html>

    <html>

    <head>

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>

    <script src="//js.jotform.com/JotFormCustomWidget.min.js"></script>

                            

    <script>

    $(document).ready(function(){

    // CODE TO GET COMPANY CODE FROM SHEET //

    }

    </script>

    </head>

     

    <body>

    <div id="main">

    <h3>Registration to Company Mapping Widget</h3>

    <span id="labelText"></span>

    <input type="text" id="regNumber">

    </div>

     

    <script type="text/javascript">

     

    JFCustomWidget.subscribe("ready", function(){

    var label = JFCustomWidget.getWidgetSetting('regParam');

    document.getElementById('labelText').innerHTML = label;

     

    JFCustomWidget.subscribe("submit", function(){

    var msg = {

     

    valid: true,

    value: document.getElementById('regNumber').value

    }

     // I ASSUME IT IS SOMEWHERE AROUND HERE I WOULD SHOW COMPANY NAME //

    JFCustomWidget.sendSubmit(msg);

    });

    });

    </script>

     

    </body>

    </html>

    Page URL:
    https://www.jotform.com/build/71773979500567

  • Profile Image
    JotForm Support

    Answered by ashwin_d on June 28, 2017 at 03:31 AM

    Hello,

    Unfortunately we do not have such feature. It is currently not possible to get the data from any external source. The only possibility for now is to get your form's full source code and add your custom script code to fetch data from google spreadsheet.

    I am creating a feature request ticket and forwarding it to our backend team. Please note that creating a feature request ticket does not ensure that feature will be implemented. It completely depends upon the feasibility and priority of our backend team.

    I would also suggest you to please take a look at our "Spreadsheet to form" widget and see if that fits into your requirement.

    Thank you!

  • Profile Image

    Answered by gillmantisnetworks on June 29, 2017 at 03:39 AM

    Thank you. "Spreadsheet to form" widget does just what I was looking for.