• benpaveley

    (@benpaveley)


    Apologies if I’ve missed this feature somewhere or it’s already included in the pro version etc… If so please point me in the direction I need to look in.

    I’m creating a price calculator for clients to book a wedding band. So far it all works perfectly but I want to be able to adjust the calculation to multiply the ‘travel cost’ by the amount of cars that will be needed. For example if they book a solo musician the travel will be as expected in the form as only one car is needed. If they book a bigger line-up like the ‘Trio Band’ – 2 cars will be needed so I’d like the form to take my ‘Travel Cost’ and multiply it by x 2 as the travel will be double for 2 cars.

    I can’t seem to find an option to reflect this in the calculations field ie something along the lines of:
    If ‘act booked’ = ‘trio_Band’- ‘travel_cost’*2

    I hope this makes sense, and any help would be much appreciated

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Nithin – WPMU DEV Support

    (@wpmudevsupport11)

    Hi @benpaveley,

    If ‘act booked’ = ‘trio_Band’- ‘travel_cost’*2

    Not sure whether I understand the above calculation, you meant to subtract trio_band from travel_cost * 2?

    If it’s only about the number of cars, can’t you create a new Select field with Calculation enabled?

    Screenshot at 17:53:50.png

    Screenshot at 17:54:09.png

    As shown in the above screenshot, you could use the Select field to determine the total cars and then on a new Calculation field multiply “travel_cost” & the new select field to get the desired amount.

    Could you please check and see whether the above fits to your needs? Please advise if I’m missing out anything.

    Looking forward to your response.

    Best Regards,

    Nithin

    Thread Starter benpaveley

    (@benpaveley)

    Sorry I don’t think I explained my issue fully.

    So on my calculator a client will pick:
    The location of their event which I have broken down into UK counties these all have different values based on the mileage we’re travelling and dictates the travel cost for us –

    They will then pick the act they would like to book eg. Solo, DJ or Trio etc… these also have their own values which are added into the calculation:

    There is more to the calculation but to keep it simple my basic calculation is the price of the location {select-1} + the act {select-2} as you can see below (plus the extra bits) but my main issue is getting an accurate price for the location as this formulae works fine for every scenario where the travel cost is as simple as ‘Location’ + ‘Act’ but one act in the list is ‘Trio’ where we need to take 2 cars and this increases the travel cost which is based on using 1 car and makes sense for 90% of the options in that dropdown so I want to add into the equation ‘Act’ + (‘Location’ = x 2 when ‘Trio’ is selected from the dropdown.)

    I hope that makes sense?

    Plugin Support Saurabh – WPMU DEV Support

    (@wpmudev-support7)

    Hi @benpaveley

    Hope you are doing fine!

    In this case it would be better to use Forminator’s conditional logic feature.

    You could add 2 calculation fields and set the Visibility option depending on the type of act selected.

    When the “trio” act is selected you can make a calculation field visible with the following formula:

    ({select-1})+({select-2})*2

    And for the rest of the act options make another calculation field visible with this other formula:

    ({select-1})+({select-2})

    Please find more information on how to apply the conditional login in our documentation below:

    https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#Forminator-Conditional-Logic.

    Hope this information helps.

    Kind regards

    Luis

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Calculations Question’ is closed to new replies.