How to reference answers to other questions within a custom widget.?

  • Profile Image
    alyonashevchenko
    Asked on February 13, 2018 at 02:08 PM

    Hi, I recently started using Jotform, and it's pretty sweet! great to have all the functionality and customizability.

    One thing I can't figure out is how to reference answers to other questions within a custom widget.

    My developer is telling me it can't be done, but it seems it is possible based on the form calculation widget: https://form.jotform.com/61500964058960 .

    Could you please give me some guidance, or direct me to the relevant reference material in the forum for how to create such a widget?

    Thank you,
    Doug

  • Profile Image
    EltonCris
    Answered on February 13, 2018 at 02:32 PM

    Your developer is right. It is not possible to pass values from regular fields to iframe widgets. Widgets are loaded into an iframe and due to the iframe nature as well as the method we offer, a field value can't be populated to the field inside an iframe.

    You can, however, pass the widget value into a regular field through the update/calculate condition or using the form calculation widget. Form calculation widget is a direct embed type widget, it does not use an iframe so it's basically like a regular field with special functions.

    Here's a documentation on how to develop your own widget https://developers.jotform.com/widgets.

  • Profile Image
    alyonashevchenko
    Answered on February 14, 2018 at 01:05 PM

    Hey Cris,


    Thanks for your response, is there any way to perform string operations using the form calculator, or only mathematical ones?

    Also, is there ever a plan to allow custom widgets to reference other fields?

    thanks,

    Doug

  • Profile Image
    Kevin_G
    Answered on February 14, 2018 at 02:15 PM

    So far, only mathematical functions are allowed on the widget, here is the guide: https://www.jotform.com/help/267-Form-Calculation-Math-Function-Reference 

    Also, is there ever a plan to allow custom widgets to reference other fields?

    For widgets developed in an iFrame it's not technically possible to have this (due to security reasons external scripts cannot access to elements in an iFrame); however, our developer may implement it as soon as there is a way to do it.

    Thanks. 

  • Profile Image
    alyonashevchenko
    Answered on February 15, 2018 at 08:49 AM

    Hey Kevin,

    That makes sense. Is there any way to develop a custom widget not in a n Iframe?

    Thanks,

    Doug

  • Profile Image
    alyonashevchenko
    Answered on February 15, 2018 at 08:51 AM

    Also, if not, do you have any program for users to sponsor development of specific new features / widgets in the native platform?

  • Profile Image
    Welvin
    Answered on February 15, 2018 at 10:24 AM

    We do not have any other widget types, so it is likely impossible to create a widget that is not inside an iframe. 

    As for sponsoring a development, I don't think we have any. But we have third party developers who created and submitted a widget to our widgets section. You may consider doing the same way. 

  • Profile Image
    alyonashevchenko
    Answered on February 19, 2018 at 09:52 AM

    Hi Welvin,


    If, as you suggest, I have a third-party developer develop a widget, can it be integrated as a core widget? In other words, can we develop a widget that references the output of other widgets, then give it to you as a future core widget so it can be publicly accessed as a core (non-iframe) widget?

    thanks,

    Doug


  • Profile Image
    TREVON
    Answered on February 19, 2018 at 11:32 AM

    Once you develop a widget and submitted to a widget page that means the widget can be used by any user. As long as your form works and conforms to our standards once submitted and approved it can be publicly accessed.

    On the issue of adding custom widget to the core, the most likely thing to happen is if the widget is deemed very useful to many users and needs update then our backend team will review they may consider revamping the form and adding it to the core. But this may take a while and a lot of considerations to implement.

  • Profile Image
    alyonashevchenko
    Answered on February 20, 2018 at 03:23 PM

    OK thanks Trevon.