How can I perform calculation on configurable matrix

  • Pride-Chem
    Asked on December 15, 2018 at 10:23 PM

    Hi, I will like to request for help in calculating the field text "Amount $" from Configurable Matrix widget.   

    1544929019Capture Screenshot 10

    I have created the Form Calculation widget to compute the sum of all the "Amount $" field text above. However, I am not sure how to go about doing this.

    Secondly, how can I change the width of field text "Amount $" smaller so that it will just fit 7 characters (eg. 1001.10)? Otherwise, it takes up too much space as the expense of the other field text. This results in 

    Lastly, how can I change the height of field text "Purpose" and "Amount $" so that all the field text of the same rows are of the same height?

    Your assistance will be greatly appreciated. 


    Many thanks!

    Jimmy 

    Jotform Thread 1674718 Screenshot
  • Mike_G JotForm Support
    Replied on December 16, 2018 at 1:43 AM

    I would like to apologize — I'm afraid that it is not possible to insert data from another field to the fields in the Configurable List widget. Our widgets require extra scripting and are loaded from external resources which make conditionally filling up the fields in a widget not possible.

    As for adjusting the fields, we can adjust the width of the "Amount" or "Purpose" fields on the Configurable List widget in your form using CSS codes (How-to-Inject-CSS-Codes-to-Widgets). However, may I suggest that instead of using a textarea to represent those fields, please use a textbox instead. By doing so, the height of those fields will be similar to the height of the "Category" drop-down field on the widget.

    You may find this guide helpful in setting up the Configurable List widget in your form — How-to-Set-Up-the-Configurable-List-Widget

    If you have other questions or concerns, please do not hesitate to let us know.

  • Pride-Chem
    Replied on December 16, 2018 at 3:16 AM

    Thanks Mike for your quick reply. The height issue has been corrected after your advice.

    I will like to clarify that I am not trying to insert data from another field to configurable list widget. I am trying to insert one of the Configurable List field to Form Calculation widget. 

    For the "Amount $," the values in the textbox are manually key by the user instead of inserted from another field. If there are 3 receipts, there will be 3 filled values in "Amount $" textbox. I have limited the number of rows to 5 and therefore, there are maximum of 5 values (receipts) from the "Amount $" textbox. These manually key-in values are used to generate the total value in the widget "Form Calculation." How do I identify each of the textbox for "Amount $" so that I can add them up in "Form Calculation" widget?

    Jimmy

  • Mike_G JotForm Support
    Replied on December 16, 2018 at 5:55 AM

    Thank you for clarifying your concern.

    Although it is possible to pass the data entered in the Configurable List widget fields using conditions,

    1544957259t05 44 Screenshot 10

    it's not possible to just get/capture specific field values from the data that was passed.

    What you can use instead is the Input Table field (Matrix Table).

    Calculate-Values-in-the-Input-Table-Through-Condition

  • Pride-Chem
    Replied on December 16, 2018 at 4:34 PM

    Thanks Mike for your kind assistance. I shall go with the input table as per your suggestion. 


    Jimmy