Is it possible to count variable number of participants to use in calculations?

  • Profile Image
    GuyPalinckx
    Asked on January 17, 2017 at 05:39 AM

    Hi 

    I used the widget and I was wondering if I could use calculated field.

    As the number of entries is variable, it should need to calculated each entry 

    e.g.  if there are 3 entries, it should multiple 3 entries with 5 € ==> 15€

    This is the amount that need to be payed before they can participate but the number of entries can be different

     

    Is this possible?

    Thanks

     

    GP

     

  • Profile Image
    seth
    Answered on January 17, 2017 at 06:30 AM

    Hello,

    I couldn't understand your query perfectly. I understand that you have variable number of participants and you want to calculate the cost with respect to participant number.

    The easiest way to do this is to use Infinite List widget:

    https://widgets.jotform.com/widget/infinite_list

    In this widget, the user can insert new lines according to their needs. There is an option that counts row number. You can use this count in your calculations:

    Or another solution is to have a separate field that user can enter the total participant number. Then you can use this number directly in your calculation.

    I prepared a sample form for you to investigate the issue further. Please feel free to clone this form and investigate. The form is: https://form.jotform.com/70162891859972

    Here is a guide in cloning: https://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL

    I hope this answer helps. Please don't hesitate to contact us for your further queries.

     

    All the best!

     

  • Profile Image
    GuyPalinckx
    Answered on January 17, 2017 at 06:46 AM

    Hi

    Thanks for your reply.

    I'll try to explain more.

    My form (https://form.jotformeu.com/70161946638361) will indicate how many runners will join. (see second page)

    they can add as many runners as they want but for each runner, they need to pay 5 €.

    I should calculated the total amount (number of runners + 5€)

     

    With the other tool, I can't add the options I already have in my form.

     

    Hope this explain it more

     

    Thanks

     

    GP

     

     

  • Profile Image
    Jim_R
    Answered on January 17, 2017 at 09:14 AM

    I'm afraid there's no way to get Calculation Values from the Configurable List widget.

    You only have 2 workarounds to choose from:

    1. EITHER create the fields as is, using plain form fields (e.g. Textboxes and Dropdown menus) then perform calculation normally.

    Related guides:

    How-to-Perform-Calculation-in-the-Form

    How-to-Assign-Calculation-Value

    2. OR use another widget that will allow you to count the number of entries (or rows) added. The Infinite List Widget does just that.

    Related guide: How-to-Add-a-Widget-to-your-Form 

  • Profile Image
    GuyPalinckx
    Answered on January 19, 2017 at 03:34 AM

    Hi

    Thanks for your answer.

    Only in the other widget, I can't use dropdown list ...  to avoid that people type what they want.

    So I'm a bit stuck here :(

     

    no other solution via CSS or so?

     

    Thanks

     

    GP

  • Profile Image
    Nik_C
    Answered on January 19, 2017 at 04:30 AM

    Unfortunately, CSS code can not help with that since CSS is used to change the style of the form. 

    I am afraid that what my colleague Jim suggested are the only options.

    All fields in the form are represented as one field, for example, Configurable list, it contains multiple fields, but it is actually one field for the form. Therefore, you can not use fields from the Configurable list in calculations.

    If you have any additional questions please let us know.

    Thank you!