PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Taking Bookings with validation that prevent multiple booking for same day

  1. Hi,

    On our site we need to take bookings for a hall that can be booked for numbers of occasions, like the Birthday Party, Conference Meeting Room, Corporate Training, or for any such other purpose. We have a different landing page for all such purposes for SEO. However, we have the single hall as an inventory, so we can take a single booking per a day.

    Gravity form works well for all we need including payment, however we're unable to figure out how to make it validate if the hall is already booked for that particular day.

    I need some advise on how to prevent gravity form accept booking for any such day where it has been already booked, and allow booking only for the days where it is not booked. So its a date against which we might need to validate. But how to do it?

    Any idea?

    Thank you in advance.
    Krunal

    Posted 7 years ago on Monday March 4, 2013 | Permalink
  2. Displaying previous booking as mentioned here might also work...

    http://www.gravityhelp.com/forums/topic/how-to-bookingsystem

    Any idea how to do it?

    Posted 7 years ago on Monday March 4, 2013 | Permalink
  3. Are you allowing the visitors to type in their date or use the datepicker, or do you present them with a list of available dates?

    Posted 7 years ago on Tuesday March 5, 2013 | Permalink
  4. Hi Chris, thank you for your response.

    I prefer a date picker. But I'm open to options and your suggestions.

    Awaiting your response.

    Thanks

    Posted 7 years ago on Wednesday March 6, 2013 | Permalink
  5. To show the previously submitted dates (the dates where the hall is already booked) you could use a shortcode like this to say "Hall is unavailable on these dates" and then list the date. Here is the shortcode I used to grab one field for all entries in one specific form: http://pastebin.com/FUF9HA6B

    That would be one approach you mentioned in your second post.

    The other way would require using the gform_validation hook and some custom code to check the date entered against all dates already submitted. http://www.gravityhelp.com/documentation/page/Gform_validation

    You can use the same function to pull out the field from all the entries to compare to the submitted data.

    Posted 7 years ago on Monday March 11, 2013 | Permalink