Calculation in Configurable List (Almost)

  • Profile Image
    ldeemiller
    Asked on February 17, 2020 at 12:05 PM

    Hello,

    For starters, Configurable Lists and Infinite Lists are pretty amazing widgets =)

    Nevertheless, the current lack of calculations on these lists is disappointing.

    In particular, we would really like to be able to sum over rows and use a calculation to disable the form submit when the percentage is not equal to 100%.

    Possible Solution?

    (1) We can already copy the contents of a row to a textbox (see example).

    We get a comma-separated list of entries.

    (2) Split the list to get the percentage, copy to another (hidden) field, and do the calculations there.

    The problem is that the substring widget currently requires fixed digits, which we do not have since the entry length is variable.

    (3) Add an additional widget which provided true substring (JavaScript) functionality.

    My question is there another way to do these calculations or substring other than downloading the source code?

    Regards,

    LD Miller

    p.s. Infinite List copies over the JSON which could be useful for calculations assuming a parser widget. I'm guessing that would cause security issues.

    https://www.jotform.com/answers/1454354-Is-it-possible-to-add-Json-code-to-the-form

  • Profile Image
    Albert_G
    Answered on February 17, 2020 at 01:28 PM

    Hi LD,

    Thank you for taking the time to find solutions on calculating both the Configurable and Infinite lists.

    Like my colleagues have mentioned on the previous thread:

    1. At this moment, we don't have a way to calculate these widgets. However, this feature has been requested but we cannot provide an ETA on when will this be added.

    2. For security reasons, it's not possible to add scripts on our forms. This means that there won't be any widgets you can use to do this.

    3. The only way to use JSon is to use the form's source code and handle it on your end to add the needed scripts: https://www.jotform.com/help/104-How-to-get-the-Full-Source-Code-of-your-Form 

    Thank you.

  • Profile Image
    ldeemiller
    Answered on February 17, 2020 at 04:57 PM

    Hello Albert_G,

    I appreciate you taking the time to respond!

    In my experience as a developer, the dynamic lists and the conditions/calculations are two of the strongest features of Jotform. Really unfortunate that they do not work together.

    A possible workaround would be to add a true substring widget to split the comma separated output from configurable lists. If memory serves, substring matching as already been requested on the forum. 2 birds < 1 stone.

    Regards,

    LD Miller



  • Profile Image
    Mike
    Answered on February 17, 2020 at 06:04 PM

    As a workaround, you may also consider using an Input Table element. The Input Table supports different field types and calculations as well.

    The downside is that the number of rows is static in the Input Table.

  • Profile Image
    Welvin
    Answered on February 18, 2020 at 05:49 AM

    I see you did it through the following form: https://www.jotform.com/form/200445970499161. That's a lot of tables plus the number of rows. 

    If there's a need to add more than the current number of tables, the user can submit the form again. That's the only way for now. 

    Please contact us again if we can help in any way.