Search/Filter on Date Range


This Discussion is public


Hello, I read the help page at about how to set up and search based on a date range and do understand how to make that work. I have a situation where I need something that works a little different.

I have a form that will be used to track rental equipment. It will have item name, delivery address, phone, email, plus a [startdate] and [enddate] that will determine what dates it will be rented out for.

On the Search Form, I want to have a [date1] and [date2] date field and set up two options to do the following:

1. Display all records that have a [startdate] that falls in between the date range of [date1] thru [date2]
2. Display all records that have NO [startdate] that falls in between the date range of [date1] thru [date2]The idea is you would set [date1] [date2] and then choose which records to display for that date range.

Is this possible and if so, would anyone be willing to point me in the right direction as to how I might make this work?

Had to post twice as it kept warning me I was spamming...

Hi, have you thought about using conditionals?

May be a few options you can look at here and at a guess use conditionals in a view to filter and show entries if the date field is equals blank.

Alternatively although i havent tested but i'm pretty sure it's doable, using conditionals in the redirect settings of your search form to a view with a advanced filter .

Just logging off from work so had to keep it quick.

Will try and update at home shortly

Hi Chris,

I will check in to doing that. I have been putting the forms and views together today so I can get a better idea of how everything will function and what is working and what will need to be fixed. I am setting up filters now and once I get a few things set up, I will look up information on using the conditionals as I am now familiar with using them.

Thank You.

Excellent I believe there is plenty of information on the website about this.

You might need to duplicate your view then set the conditional parameters in the form setting url to point to each page your views are allocsted on using the conditional logic.

Or again alternitavly you can try duplicating your view code and wrap it in conditional logic somehow.

Have a play see how you get on and if you still struggle give me a shout

Hi Chris,

I think setting it all up and working through it helps a lot. I have found a flaw in my logic already that I need to work around. I have used formidable forms for years for regular forms but nothing too complex so trying to do much beyond a normal contact form now is a learning curve. I am interested to see how I can make this work. I may end up needing to hire a consultant or someone to assist with it in the end but for now, I am working through the process so at least I can explain to someone else what is needed.

Thank you for your help,

Im doing a similar setup and can possibly guide you through it we can both learn as we go along. The help is there for free if you so need it.

Hi Chris,

Thank you. I am still trying to wrap my head around what I really need to do to make this work.

originally I thought,

Form for Inventory.
Form for rental entries ( pulls basic equipment info from the inventory module.
Form for Search ( basically two fields - [Start Date] [End Date]
View to display search form and results.

I did not give account to how I would display all the equipment ( 40 of them ) if there were no reserved dates. So I am thinking now I may need to set up additional views possibly and sort this issue out before moving forward.

May I take a look at your setup as it may be easier to point you in the right direction?

Is there an alternative way to communicate to discuss?


Hi Thomas, I have just sent you an email.


Reply to this Discussion