I'm having trouble getting the rEEservation form to show up properly on my website. The basic form shows up okay, but it's not showing the options for which I created channels for. When 'proceed' is clicked, it leads to an error page saying, 'The object for booking is not provided' - because there was no way to select the options.
I'm trying to create a reservation system for 2 tables at a cafe, for 3 hour slots from 11am - 11pm. This is how it's set up at the moment: Channel: reserve_table Channel Fields: {table} which is a text input field Channel Entries: 8 of them (Table 1: 11am - 2pm; Table 1: 2pm - 5pm; Table 1: 5pm - 8pm; table 1 - 8pm - 11pm - and then repeated for Table 2).
The template code:
{exp:channel:entries channel="reserve_table"}
<h3>{title}</h3>
{exp:reeservation:form entry_id="{segment_2}"}
<p>Name: <input type="text" name="name" /></p>
<p>Email: <input type="text" name="email" /></p>
<p>Phone*: <input type="text" name="phone" /></p>
<p>Booking date*: <input type="text" name="date_from" id="date_from" value="{current_time format="%Y-%m-%d"}" /></p>
<p>Leave a comment for your booking: <textarea name="comment"></textarea></p>
<p><input type="submit" value="Proceed" /></p>
{/exp:reeservation:form}
{/exp:channel:entries}
Ideally, the customer would be able to select a table time slot on a particular date (dropdown menu perhaps?), and have it verified that the time slot has not already been booked.
I've scoured the docs and just can't seem to move it past the point i'm at. I can add manual reservations, but not from the website. How do I get the channel entries list to show up? Where does the exp:reeservation:check (or do I use exp:reeservation:check_multiple?) code go? And if I were to use the Simple Calendar code, which is provided, where does that go?
If anyone who has successfully used rEEservation before can help, or even let me peek at your template code, I would greatly appreciate it. Thanks!
==== Update: Problems solved!
I got rEEservation working with lots of help from Yuri. In the end, I now have 4 channel entries, one for each time slot. In the rEEservation settings, I have it set so that each time slot (or 'object') can be booked a maximum of 2 times per day (because there are two tables which can be booked). My final template code looks like this:
<code> {exp:reeservation:form return="bookings/thank_you"}
<p>Table/slot*: <select name="entry_id">
{exp:channel:entries channel="reserve_table" dynamic="no" disable="categories|custom_fields|member_data" orderby="title" sort="asc"}
<option value="{entry_id}">{title}</option>
{/exp:channel:entries}
</select></p>
<p>Name*: <input type="text" name="name" /></p>
<p>Email*: <input type="text" name="email" /></p>
<p>Phone*: <input type="text" name="phone" /></p>
<p>Booking date*: <input type="text" name="date_from" id="date_from" value="{current_time format="%Y-%m-%d"}" /></p>
<p>Leave a comment for your booking: <textarea name="comment"></textarea></p>
<p><input type="submit" value="Proceed" /></p>
{/exp:reeservation:form}</code>