Form Calculation: How to count the rows in Configurable List widget?

  • Profile Image
    khrisafenyo
    Asked on January 25, 2023 at 5:56 AM

    As seen on this document, i want the number of days to automatically add up when:

    1. a new row (+add new date) is added to the form
    2. or if possible when the row is filled up.

    Please NOTE : This is in terms of adding the rows not any values in the rows.

    I tried using the form calculation "count()" to calculate the rows but it didnt work.

    Please can you show me.

    Thank you.


    Form Calculation: How to count the rows in Configurable List widget? Image 1 Screenshot 20


  • Profile Image
    Christian JotForm Support
    Replied on January 25, 2023 at 6:38 AM

    Hello Khrisafenyo,

    Thanks for reaching out to Jotform Support. Unfortunately, the Configurable List widget does not yet fully support calculations so most of the calculations aren't going to work. But I found a workaround that you can follow to count the number of rows in a Configurable List widget; let me show you how to set it up:

    1. Add an Asterisk at the beginning of each field to make them Required.1674646504 63d113e86ecee  Screenshot 10
    2. Add another row in the Fields Configuration, then type Day: static: 1:1.1674646567 63d11427ba425  Screenshot 21
    3. Go to the Custom CSS tab and then paste the CSS code below to hide the Static field. 1674646577 63d11431b7f22  Screenshot 32
    4. Simply add the Configurable List widget in the Form Calculation/Number of Days field.1674646591 63d1143f70fb7  Screenshot 43

    Make sure that the Configurable List widget in the Form Calculation/Number of Days field is in Number(0-9) and not in String(A-Z). Below is the CSS code that you need to inject into the Configurable List widget. Check out my Demo Form or the screencast below to see what it's going to look like afterward:

    #listContainer .staticText, .configurable-list-field-wrapper.col4{
    display: none;
    }

    1674646376 63d11368c522c  Screenshot 54

    Give it a try, and let us know if you need any more help.

  • Profile Image
    khrisafenyo
    Replied on January 25, 2023 at 7:55 AM
    Hello Team,
    Great it works perfectly for now.
    Thank you.
    Regards
    ...