How to add some javascript to the widget?

  • Profile Image
    wamco_reg
    Asked on June 12, 2020 at 09:08 AM

    Hi, how can i add some javascript to the widget? For example, to enable some calculations etc. when a field in the widget changes. And can a class value be added to the fields with an auto increment with each row like -. This could help in doing some javascript activities.

    Thank you



    This is a re-post of a comment on How to Set Up the Configurable List Widget

  • Profile Image
    ashwin_d
    Answered on June 12, 2020 at 10:20 AM

    Unfortunately it is not possible to add any JavaScript code in your widget or form. Though you can download form's full source code and then add JavaScript in form but it will not work for widgets. Please note that widgets load inside a separate iframe from different location.

    I would suggest you to please explain your calculation requirement a bit more in detail and we will see if we can find any workaround without using configurable list widget. 

    We will wait for your response.

  • Profile Image
    ashwin_d
    Answered on June 12, 2020 at 10:22 AM

    And can a class value be added to the fields with an auto increment with each row like

    Please accept my apology as I missed your second question. I would suggest you to please explain your class value requirement a bit more in detail, and we will take a look.