I would like to set a default value and perform a calculation in the Input Table field

  • Profile Image
    campussurvival
    Asked on January 06, 2019 at 10:55 PM

    Hi - I am working on the following form:

     

    https://form.jotform.com/90058238100144

     

    I would like the "credits" column to have a number that I define for each item, the "quantity" column to have a number input by the user, and the "total" column to automatically calculate the total credits for each item when the user makes the input. The only field editable by the user should be the "quantity" fields. Then at the bottom there should be a running total of all the values in the third column.

     

    Can you help with this?

     

    Thank you!

  • Profile Image
    Welvin
    Answered on January 07, 2019 at 02:33 AM

    You need to do this with conditional logic since there is no option you can set a default value in the Input Table. You need to have two conditions for each row. One that is to fill the Credits box, and another to calculate the total.

    Here's my cloned version of your form showing this method: https://form.jotform.com/90061007041944. I only did the first row.

    Here are the steps to do it;

    1. I've added a hidden field with default value to trigger the condition:

    2. Added a condition to fill 1st Row Credits box, based on the hidden field:

    3. Added a condition to calculate Credits box with Quantity box;

    Note that on this step, item #3 (Add Field) when clicked yields the input table options. Select both Credits and Quantity then add * in between.


    It will be a massive list of conditions and might take your time. Let us know if you are confused with the steps or if you have a question about it. 

  • Profile Image
    campussurvival
    Answered on January 09, 2019 at 10:43 AM
    I feel like a complete idiot, but I can't even begin to figure this out. I cloned your clone to my account soI could see how the hidden field works, but the rest of it makes no sense to me - partially because I can't make sense of the diagrams you included (many are too small for me to see what's there). Is there another way someone could walk me through this?Thanks.AmyNew response receivedOn January 7, 2019 at 2:33 AM JotForm <noreply@jotform.com> wrote: A new response has been received:Answered by Welvin  You need to do this with conditional logic since there is no option you can set a default value in the Input Table. You need to have two conditions for each row. One that is to fill the Credits box, and another to calculate the total.Here's my cloned version of your form showing this method: https://form.jotform.com/90061007041944. I only did the first row.Here are the steps to do it;1. I've added a hidden field with default value to trigger the condition:2. Added a condition to fill 1st Row Credits box, based on the hidden field:3. Added a condition to calculate Credits box with Quantity box;Note that on this step, item #3 (Add Field) when clicked yields the input table options. Select both Credits and Quantity then add * in between.It will be a massive list of conditions and might take your time. Let us know if you are confused with the steps or if you have a question about it.  View this thread on browser » Unsubscribe Thread1546846415 
    ...
  • Profile Image
    Welvin
    Answered on January 09, 2019 at 11:29 AM

    You can open the pictures into a new tab on your browser to clearly see it. They're big.

    I'm creating a video for you. Hopefully, it will work for you this time. 

  • Profile Image
    campussurvival
    Answered on January 09, 2019 at 11:43 AM
    Nevermind - I think I figured it out. I'll let you know if I have any more trouble.Thanks!AmyNew response receivedOn January 7, 2019 at 2:33 AM JotForm <noreply@jotform.com> wrote: A new response has been received:Answered by Welvin  You need to do this with conditional logic since there is no option you can set a default value in the Input Table. You need to have two conditions for each row. One that is to fill the Credits box, and another to calculate the total.Here's my cloned version of your form showing this method: https://form.jotform.com/90061007041944. I only did the first row.Here are the steps to do it;1. I've added a hidden field with default value to trigger the condition:2. Added a condition to fill 1st Row Credits box, based on the hidden field:3. Added a condition to calculate Credits box with Quantity box;Note that on this step, item #3 (Add Field) when clicked yields the input table options. Select both Credits and Quantity then add * in between.It will be a massive list of conditions and might take your time. Let us know if you are confused with the steps or if you have a question about it.  View this thread on browser » Unsubscribe Thread1546846415 
    ...