I have a form page that request 7 years of address history. Each entry requires a To:Date and From:Date. I’m using the gravity wiz extension to conditionally show additional address boxes if the the previous entry is less than 7 years from the current date… Show if From:Date field is greater than {today:-7 years}.
I’d like to also have an explanation paragraph field, that would conditionally show if there is a gap of more than 1 month between any entry… so if the To:Date is more than a month from the previous From:Date
Our Day Count snippet that Lonepc shared above is a great resource!
If you’re a Gravity Perks customer (and it sounds like you are), we’ll be happy to provide you a copy of our early access GP Date Time Calculator plugin which makes this process even easier (and you won’t have to touch any code).
With this plugin you could create a Number field and calculate the number of days/months/years/etc between any two Date fields on the form. You could then use conditional logic to show the Paragraph field when the Number field value was greater than the desired gap.