• Resolved Justin

    (@justinxhale)


    I’m testing this to create a quote form. I’ve tried using radio buttons but I seem to be formatting everything wrong.

    What I’m trying to calculate

    Field 1 Guest Count: if guest or less, total = 0. If over 100 guest its 3 per (so 101=3, 102=2, etc)
    Field 2 Time: (using radio, would prefer number field but I’m fine with radio): 1hr = 450, 2 hours = 800, 3 hours = 1200
    Field 3 (will be checkboxes): For every item selected its +50
    Field 4 Additional hours: 400 for every additional hour

    So if someone Choose
    -201 Guest (201-100)x3=303
    -3 Hours = 1200
    -4 checkboxes = 200
    -2 additional hours = 800
    GRAND TOTAL = 2503

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @justinxhale

    So, assuming:

    – First field is a number field (fieldname1)
    – Second field a radio button whose choices’ texts are: 1h, 2h and 3h, and their values: 450, 800 and 1200 respectively (fieldname2)
    – Third field a checkbox field, where the values of choices are numbers (50 in this case) (fieldname3), and you have ticked the option in its setting: “Merge ticked up options (sum or concatenation) or their values are returned as an array.”
    – Fourth field, another number field for entering the extra hours (fieldname4)

    You simply should to insert a calculated field in the form with the following piece of code as its equation:

    
    MAX(fieldname1-100, 0)*3+fieldname2+fieldname3+400*fieldname4
    

    and that’s all.
    Of course, using the correct fields’ names on your form.

    Best regards.

    Thread Starter Justin

    (@justinxhale)

    @codepeople thank you so much absolutely perfect!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Formula Help’ is closed to new replies.