Add conflict detection on reservation forms

Our Yacht Club client has three workslips that members can reserve for up to 3 days. Using core taxonomy, content types, views, and the Events, Conditions, and Actions (ECA) module, we built a system to allow members to make reservations, and have the system prevent double-bookings.

This starts by having a vocabulary for the workslips, one taxonomy term for each one. Members book reservations that are a custom content type with date range and the term reference to the workslip. The ECA model acts on the presave event. It validates that the date range is in the future, and is shorter than 3 days. Then it passes the dates and slip into a view that takes these as contextual filters, and lists existing reservations in that date range. The model then looks at any results, and if it's not an existing reservation for this user, it sets a validation error on the dates, letting the member know that date is booked for that slip.

ECA can really do it all!

Add new comment

The content of this field is kept private and will not be shown publicly.

Filtered HTML

  • Web page addresses and email addresses turn into links automatically.
  • Allowed HTML tags: <a href hreflang> <em> <strong> <blockquote cite> <cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h1> <h2 id> <h3 id> <h4 id> <h5 id> <p> <br> <img src alt height width>
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.