Is it possible to attach an external data source to a form?

  • sckuperman
    Asked on June 9, 2017 at 6:38 PM

    Is it possible to attach an external data source to a form?

  • David JotForm Support
    Replied on June 9, 2017 at 6:48 PM

    It is not currently possibly to reference an external data source in the form.  You could potentially use the forms full source code and add it to your web page:

    https://www.jotform.com/help/104-How-to-get-the-Full-Source-Code-of-your-Form

    But writing the appropriate code to integrate your form with your data source is not something we would be able to help with.

  • sckuperman
    Replied on June 12, 2017 at 3:36 AM

    I just discovered the "Spreadsheet To Form" Widget.  In it's most basic implementation on a form, I could hide the field and apply the "unique" column in a spreadsheet to automatically populate the options in a separate drop down field of the same name as the label of that column in my spreadsheet.  Frankly, I could just cut-and-paste the options from the spreadsheet to the drop down and eliminate the need for the Widget.

    But the Widget could offer other benefits:

    1. Can the Widget be automated via a trigger set by a Condition, rather than the user pressing the button?  In this, if the drop down associated with the "unique" column is 'filled', could the Widget know the filled selection from the drop down and populate the other associated fields?

    2. Is there a way to alter the Widget so that the matching fields/column-labels could all be "unique" so multiple drop downs can have their options automatically updated?

    3. Can the Widget work with the Dynamic Drop Down?

    4. Is there an SDK?

    This functionality would solve MANY problems for MANY users.

  • Charlie
    Replied on June 12, 2017 at 5:48 AM

    It seems like the Spreadsheet to Form widget is a new addition in our list, this is actually the first time I saw this. And I presume this was added to allow users to upload a much larger list as a lookup table. 

    With regards to your questions:

    1. Can the Widget be automated via a trigger set by a Condition, rather than the user pressing the button?  In this, if the drop down associated with the "unique" column is 'filled', could the Widget know the filled selection from the drop down and populate the other associated fields?

    Unfortunately, this widget requires the user to hit the button to trigger its functionality. The conditional logic has a limitation on how to interact with specialized fields like widgets, but you can go ahead and test it out further.

     

    2. Is there a way to alter the Widget so that the matching fields/column-labels could all be "unique" so multiple drop downs can have their options automatically updated?

    I'm not sure if I understood this correctly, currently, if you want to update the widget you need to open the form editor and open the widget settings. However, it's possible to update the widget using an API call. Here's our API document page: http://api.jotform.com/docs/. For the specific section on how you can update a field, you can check this part of the documentation: http://api.jotform.com/docs/#post-form-id-question-id

     

    3. Can the Widget work with the Dynamic Drop Down?

    Unfortunately, this is not possible as the Dynamic Drop Down widget field has its own specialized functionality and behavior. I'm not exactly sure how you want them to communicate though. 

    4. Is there an SDK?

    I presume you are looking for our API instead? Here's the link to it as mentioned earlier: http://api.jotform.com/docs/

     

    If you want to inject your own custom scripts or functionality directly on the form, that is possible by getting the form's full source code. Here's a guide about it: https://www.jotform.com/help/104-How-to-get-the-Full-Source-Code-of-your-Form. You can embed your form's full source code on your own web page, from there, you can inject your own custom scripts. 

    I hope that helps.