- torreszachAsked on December 02, 2016 at 04:39 PM
All I want to do is take the current date, add a number of days to it (for example 3 days), and display the projected shipping date (3 days added to the current shipping date).
So for example:
customer chooses a 3 day shipping option on my product.
Today is 12/2/2016.
When he clicks on my 3 day shipping radio button, a projected date of 12/5/2016 is calculated and displayed.
I've tried using the calculation field widget with date(), datestring(), and even just adding and subtracting days; and it gives me crazy dates not even close to the current.
Please help, I'm super frustrated.
- JotForm SupportdavidAnswered on December 02, 2016 at 06:43 PM
The way you are thinking of doing it is correct. However, you would use a condition to update the second field instead of a form calculation widget.
Create an "Update/Calculate form field" condition:
Then, set up your conditions as follows:
I have nearly the same setup you have in your form in my example. A date field for the current date with the default set to the current date. Then, a second field for the output. I added a radio button field to my example form for the different shipment time selections. The summary field is your second date field. "Today" was added via the "Add field" button on the right. To get the date + 3 days is simply the today field + 3.
Here is my example form to show you how it works:
You can clone it to your own account if you would like:
- ZachAnswered on December 02, 2016 at 07:19 PM
Okay that works but whenever I put that you can't select a certain day, Sunday for example, it leaves the estimated date field empty.
- JotForm SupportMike_GAnswered on December 02, 2016 at 10:51 PM
To my understanding, you would like to exempt a day for the shipment, is that correct? For example, let's say you don't want to include Sunday to ship your products and the form was submitted Saturday and 3 days is selected for the shipping time, rather than having Tuesday for the estimated shipping date, it should be Wednesday because Sunday is not being counted.
Can you help us understand your concern by giving us more details, please?
We will wait for your response. Thank you.