I have to setup the form in such a way that Check Out date is post Check In date selected and also, I am able to find out the number of days between the two.
It would be helpful if someone could post on how to achieve this.
I have to setup the form in such a way that Check Out date is post Check In date selected and also, I am able to find out the number of days between the two.
It would be helpful if someone could post on how to achieve this.
If you need to restrict the date so that check out is post check in (like a hotel stay) you can perform this validation after submission, using the gform_validation filter http://www.gravityhelp.com/documentation/page/Gform_validation
Commonly online, this functionality is provided on the front end, so that once a check in date is selected (which cannot be in the past) that the check out dates are only post-check in date. That functionality is provided on the front end by JavaScript. You can use jQuery to modify the date pickers on your web page. You can find documentation here: http://jqueryui.com/datepicker/
Regarding the number of days between the two, you will have to write the PHP to do the math yourself. You can compare dates and then store the number of days, in the entry, using the gform_pre_submission_filter http://www.gravityhelp.com/documentation/page/Gform_pre_submission_filter
This sort of data-based functionality is not built in to Gravity Forms but can be added by using the built in hooks and filters offered by Gravity Forms.