-
neorankingAsked on May 27, 2016 at 5:51 AM
How to auto filled the "Contact Period" field by the values entered from "Start Date" and "End Date"? like this format ->
"Start Date - End Date" or "Start Date" to "End Date".
I'm trying to do it with Conditional Logic but the values are not displaying in Contract Period Field.
I hope you can help me thanks! (please see screenshot)
Page URL: http://www.ashtree.com.sg/airportpass/ -
CarinaReplied on May 27, 2016 at 6:26 AM
1. Add 2 Date Time fields:
2. Please add 2 form calculation fields, one for each date field. Add the correspondent date field to the calculation formula.
Double click on the red square area to activate the text option:
Repeat this process for both date fields.
3. Add a 3rd form calculation. To the formula add the start date calculation, add the text "to" , add the end date calculation field:
You can test and clone the demo form:
https://form.jotform.com/61472782620961
Let us know if we can assist you further.
-
neorankingReplied on May 27, 2016 at 7:59 AM
Hi thanks for the solution!!
-
beril JotForm UI DeveloperReplied on May 27, 2016 at 8:35 AM
On behalf of my colleague, you're most welcome. Feel free to contact us anytime.
-
neorankingReplied on June 13, 2016 at 12:19 AM
Hi,
Is it possible to have the "CONTRACT PERIOD:" field value to months?
For example:
If I enter 13/6/16 to 13/9/16. It should calculate as 3 months for the contract period. -
beril JotForm UI DeveloperReplied on June 13, 2016 at 2:55 AM
Yes, it is possible to calculate the number of dates between two days. All you need to do is subtracting two dates with your calculation field as you see below:
Here is how it works:
If you have any question or issues, please do not hesitate contacting us. We will be glad to assist you.
-
neorankingReplied on June 13, 2016 at 4:57 AM
Thanks for that wonderful solution. Is it possible to say like "2 Months" or "2 Days" or "2 Years"?
-
beril JotForm UI DeveloperReplied on June 13, 2016 at 6:18 AM
You're most welcome.=) Yes it should be possible with JotForm. To do that, we need to add different calculation field on your form. I will try to find how to do it on your cloned form. After that, I will get back to you soon with a solution as soon as possible.
-
neorankingReplied on June 13, 2016 at 7:07 AM
Thanks Beril!
-
beril JotForm UI DeveloperReplied on June 13, 2016 at 9:39 AM
Hi again,
Finally, I am able to manage your problem.=) First of all, I've added the calculation field as you see below:
By that way, we will calculate days, months and years. After that, I've added three calculation fields on your form as you see below:
I've calculated the days, months and years value ass you see below:
Days value:
Months value:
Years value:
Now, we will hide month and year if the calculation is less than 1. We will hide day and year if the calculation is less than 12 and greater than 1. And finally, we will hide month and day if the calculation is greater than 12.
However, I am not able to hide days and I am not sure why it is happening.
Here is how it works:
I will try to solve that issue. If I solve that I will update you via that thread. Kindly, also check your demo form. Here is your cloned form:
https://form.jotform.com/61640913986969
Feel free to clone it. We would appreciate it if you could also test it on your side and let us know the result.
-
neorankingReplied on June 14, 2016 at 12:31 AM
Thanks, I will try this on my form. PLease let me know if you resolve the "Days" Issue.
Many thanks!
-
jonathanReplied on June 14, 2016 at 12:39 AM
Please don't hesitate to contact us again anytime should you require further assistance.
Thank you.
-
neorankingReplied on June 14, 2016 at 4:38 AM
Hi,
I tried to clone the form, but as you can see here - http://www.ashtree.com.sg/airportpass/ the PeriodDays, PeriodMonths and PeriodYears are showing.
-
neorankingReplied on June 14, 2016 at 4:39 AM
PeriodMonths is also not working properly.
-
liyamReplied on June 14, 2016 at 7:06 AM
Hello neoranking,
Can you try embedding the form using iframe embed code instead of javascript? It appears that it's conflicting with the other form and other scripts on your page.
Please let us know if the problem persists after the change.
Thanks.
-
neorankingReplied on June 14, 2016 at 8:05 AM
I tried, but its still not working Liyam.
http://www.ashtree.com.sg/airportpass/ -
jonathanReplied on June 14, 2016 at 9:31 AM
Can you also take a screenshot of the problem? You can share to us a visual of the issue so we can understand more about it. You can upload the screenshot image when you respond using this link https://www.jotform.com/answers/848415
--
I test it on your website http://www.ashtree.com.sg/airportpass/ but I could not replicate the issue so far. See the video below of my test.
We will wait for your updated response.
-
neorankingReplied on June 14, 2016 at 9:52 AM
Please see attached image. As you can see I have put a date June 16, 2016 as Start Date and July 16, 2016 as End Date. As a result it should give me a "Contract Period" of 1 Month right? Also, all calculations must be hidden and will be displayed upon inputting start date & end date.
Thanks a lot.
-
liyamReplied on June 14, 2016 at 12:00 PM
Hello,
Can you try clearing your browser's cache? So far this is how it works on my view on your webpage:
If the problem persists after clearing your browser's cache, please do let us know.
Thanks.
-
neorankingReplied on June 14, 2016 at 10:45 PM
Hi Liyam,
There's no problem with days. Try month like June 21, 2016 - July 21, 2016. You will see the issue. It should show 1 month but its not working.
Best regards.
-
Chriistian Jotform SupportReplied on June 15, 2016 at 1:32 AM
I checked the conditions in your form and it seems that the issue is caused due to the value 1 not being included in the condition. Since the condition is set to "greater than 1" but the exact month is only equal to 1, the proper calculation in the condition is not being applied. To resolve the issue, please replace the greater than "1" conditions into greater than "0.99".
Once you have replaced all the conditions with the value 1 into 0.99, the condition should now work correctly. Here's a demo form so you can see it in action: https://form.jotform.com/61660509575966
-
neorankingReplied on June 15, 2016 at 1:51 AM
It's working now thanks for that Chriistian! Can you see what's the problem why the "CONTRACT PERIODdays" is not hiding while other are working properly?
-
beril JotForm UI DeveloperReplied on June 15, 2016 at 3:28 AM
Hello,
Finally, I found the issue.=) It seems there is an old condition which causes that problem. If we disable that it is working properly.
Please also test it on your side and let us know the result. If you notice any issue, please do let us know. We will be happy to help you.
-
neorankingReplied on June 15, 2016 at 10:22 PM
Aweseome, thanks Beril!! :)