Automatically exclude current date...

User 49995 Photo


Ambassador
8 posts

Loving the new programme, but wondering if it is possible, when configuring the Web Form Builder's calendar "Allow Dates" options, to automatically exclude the current date on a rolling basis?

In effect this would disable the ability of the form user to select the current 24hr period, a necessary option when using the calendar within a restaurant reservation form, where confirmation of the reservation is only emailed back to the sender 'within 24hrs'.

Regards
User 464893 Photo


Ambassador
1,611 posts

That is a sticky one. I just had a look at the date element and it appears that you can put a date range but not a start date plus one.

I think in the form make a statement that the reservation can only be made plus 24 hrs from now or ring and give a phone number. You could use javascript in the actual page to display the date from when a reservation could be made.

Hopefully someone has a possible solution. It is possible but would need a manual approach not covered by WFB.
The form could collect the necessary information like email name phone no etc
Remember there could be a lot more going on in a page than just a form. If the page has a php extension then you can try some of the examples available to achieve what you want.

What I am saying is when the page loads a message at the top says reservations can be made from (Today+1) or if you want to see if it can be sooner ring .........
Else fill in the form to make the reservation. Its a work around but I believe it reasonable.
The Guy from OZ


User 49995 Photo


Ambassador
8 posts

Thank you for your thoughts.

I have included a phone number and explicitly stated on the form that booking should be + 24hrs, etc. but just wondered if it was possible to make the process look 'prettier'! Just icing on the cake:)

Again, thank you for your response. All your suggestions noted.

Regards,
Lorri
User 464893 Photo


Ambassador
1,611 posts

I have given it some thought and using WFB I would create a page and get the form going, place in the form down from the top. Give the page a php extension and in the html at the top of the page place a holder for date. Use php to get the date and display it there

You could state "Reservations available After _____ ".
For something like this it would probably be best to create your own form with that logic built in. I cannot think of a neat work around with WFB. Maybe someone smarter can offer a solution.

As it appears to be a running business you might be able to approach a Coder/Webmaster to create the coded page to suit your requirements.
The Guy from OZ


User 49995 Photo


Ambassador
8 posts

Thanks again for your time on this. I will get my web-savvy friend to look into the .php route.

'Tis a great programme - and considering all the other things it can do to produce a really good looking and functional form, the 'calendar current date' issue is just a niggle.

May be a candidate for the 'wish list'. :)

Best regards.
User 464893 Photo


Ambassador
1,611 posts

Ahh! Good you have someone who can help in php. What you are after is something for a unique approach. You will probably find that he manually creates the form that way he can do the necessary changes to the date element.

The form builder is fantastic. I can write forms easily but not as fast, so for my needs It suits. I just do not have those types of issues. I guess first I would look for a work around but in a case like yours I would create a php page with the particular intelligence required. If you really get stuck I can help. Trouble is I always make commitments and run out of time for my own projects so try hard to resolve it first yourself and let me know how far you have reached.
This code should get the value of tomorrows date
$tomorrow = date('Y-m-d',mktime()+86400);

The Guy from OZ


User 49995 Photo


Ambassador
8 posts

Thanks again for your help. We appear to be resolved by just including the text message (ie if booking within next 24hrs ring *********) etc.

The .php route would be interesting as an exercise, but it's not now 'urgent' as the text line appears to suffice.

Best regards

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.