Block page if date is earlier

I have a dynamic page that receives database data upon opening, specifically the xxxx-xx-xx value for the "start date."
I would like the page to be blocked if the date is less than the current one, and redirected to the home page after a short message.
There are various solutions, but perhaps Wappler is the best and simplest method?

Hi Marzio,

Maybe I am not understanding what you are trying to achieve but can't you just simply filter out the records in your SC query instead of redirecting to home page?

This problem occurs very rarely, but it has happened once or twice.
For various reasons that I won't list, the initial booking date may appear earlier than the actual date, and this should be avoided.
To resolve this, the best solution, in my opinion, is this:
When opening the confirmation page, if this error occurs, cancel the booking and, after a message, return to the beginning of the process.

On the Server connect action could you not just have a condition to test the 2 dates. If the condition happens that you don’t want to happen have a response step.

then on the front end when the response you set comes up have a dynamic event. To warn the user what’s happened and redirect to the home page.

2 Likes