• Resolved trevaskis

    (@trevaskis)


    I am having an issue with the date validation lookup on the booing form. I have trawled posts and have installed your Micro Plugin [requirejs-for-rtb.php] which has helped greatly but there is still what seems to be a very simple validation anomaly with the date format and validation thereof.

    Firstly, I am using the ‘Nuvo’ theme which bundles your plug-in, and they obviously hi-jack the initial form. I have changed the date format on their booking-form.js to ‘d/m/Y’ [previously back to front which confuses us Brits!]
    and the datepicker works perfectly – however, when the reservations form is generated the date is invalid and I cannot for the life of me find the variables to change the ‘rules’ for this. If I used the reversed dates i.e. 2/28/2015 for example – all is good.

    Obviously, I can reverse the change, but it is such a simple issue I thought it was worth contacting you….?

    Hope you can help. The test site is http://www.thegrandcafe.co.uk/newsite
    booking form on http://www.thegrandcafe.co.uk/newsite/restaurant-reservation/

    Many thanks

    Andy

    https://ww.wp.xz.cn/plugins/restaurant-reservations/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi Andy,

    To validate correctly, the date needs to be submitted in a format that PHP’s DateTime object parses correctly. The date and time pickers in my plugin allow you to show one date format to your customers, while still submitting in a format that isn’t confusing to DateTime (basically, the DateTime object doesn’t know the difference between Brit and American dates, and just assumes American).

    Unfortunately, the NUVO theme has changed the date and time pickers used in the form. And these pickers do not allow you to show one format to users and submit another.

    What I would recommend is you try using the following format: Y/m/d. This will be unambiguous to your users and the DateTime object — although I realize it’s not as pretty for your users.

    I will liaise with the NUVO theme people to see if a fix can be made in the theme for future versions.

    Thread Starter trevaskis

    (@trevaskis)

    Many thanks for your rapid response. I have done as you say and set the date format Y/m/d – all seems perfect and the reservation is now working and adding to the bookings table – however, there are now no emails being sent??

    I have tested a number of times and I get the confirmation page instantly where normally there would be a delay. I am able to send mail via the ‘Bookings’ list via ‘Send Email’ link though the ‘SEND EMAIL’ pop-up simply stays open indefinitely with the progress wheel turning….

    Prior to me adding the Micro Plugin [requirejs-for-rtb.php] I was able to make this work – though it was very slow indeed.

    What can I do to remedy this…?

    Hi Andy,

    The FAQ includes a step-by-step list of things to check if you’re not receiving booking notifications. It’s usually related to server settings in some way, but it could be a lot of things.

    If the Send Email progress wheel never goes away, that’s probably because no result is received from the request. The most likely issue is that there is a JavaScript error that is cascading down to effect it. If you want me to take a quick look, please send login details to me via the contact form on my site.

    Thread Starter trevaskis

    (@trevaskis)

    Many thanks – will mail details so you may see first hand and let me know.
    Much appreciated
    A

    Hi Andy,

    I reached out to the people behind the Nuvo theme and they said that they’ve made some fixes for the booking form in recent versions of the theme. I’d recommend you update to the latest copy. This won’t fix the email issues but may (or may not) address the date format issues.

    This was resolved over email.

    Thread Starter trevaskis

    (@trevaskis)

    Many thanks for your help.
    Now all seems to be working perfectly, but the ‘success’ page is not rendering at the end of the process. The emails are sent, the booking is added, but where before the page displayed correctly, I now have a blank page.
    http://www.thegrandcafe.co.uk/restaurant-reservation/
    As far as I can tell, nothing has changed and no updates or plugins have been added.

    Hi trevaskis,

    I think you’ll need to take this issue to your theme developer, the folks behind Nuvo. I have no idea what would be the cause. But if you switch to a stock theme, like TwentyFifteen, and the problem doesn’t occur there, you can be pretty sure this is a conflict with the theme.

    They seem to be doing a lot of unorthodox things to the way WordPress loads template files. To be honest, I’ve seen a lot of conflicts with this theme and they don’t seem to be resolving the issues very well.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Date validation issue rtb-booking-form’ is closed to new replies.