Seasonal Prices with Cost Estimation & Payment Forms Builder

Hi there. I reached out to the author of the E&P Form Builder but they told me I should contact you. Here is my issue:

I’m trying to implement a form that uses different prices depending on the dates the user picks. We have a “high-season” from June 1st to August 31st and all other dates are considered “low-season”. If the user chooses a date during high season in the “Pickup Date” field, then the price is 90 x the number of days selected. I used the date difference calculation (Dropoff Date - Pickup Date) to find the number of days. If the pickup date is during low-season, then the price is 60 x number of days.

My question is, how is this possible? This is what my formula looks like after using the buttons and example provided:

60*[dateDifference-238_237]
if(([item-237_date] >‘May 31, 2019’)&&([item-237_date] <“September 1, 2019”)) {
90*[dateDifference-238_237]
}

I’ve tried different variations and methods but nothing seems to work for me. Thank you!

Hey Thor,

You might need to convert the date to Unix Time instead of a string date (i.e. September 1, 2019). See https://www.epochconverter.com/

Please give us WordPress Admin access in a Secure Note so we could replicate your setup and see if it’s possible.

Thanks.

1 Like

Thanks for the reply. You’re right, the issue was the date format. Everything is working now that I manually changed that. Thanks again!

We are delighted to assist you with this.

Cheers!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.