by
ewanmc » Wed Apr 01, 2015 11:54 pm
Hi KK,
I have a question about this. Don't know if I am missing something, or if I've just been working too long today!
I want to create/edit a calendar event using databound forms (accessed by an extended authenticated user on the front end).
My problem is that I can't figure out how to use the datepicker to change (or create) k_publish_date from a databound form.
I'm making a site for a hairdressers, and I don't have faith that they will be able to set the date in a text field like this - '2015-04-01' - so I want them to have a date picker on their "add booking" page/form. I just can't see how to do it at the moment...
Hope I've made sense!
- Code: Select all
<cms:template title='Bookings' clonable='1'>
<cms:editable name='desc' label='Notes' type='textarea' />
<cms:editable
name="staff_member"
label="Which Staff member is the appointment for?"
desc="Select one from these"
opt_values='stafflist.php'
dynamic='opt_values'
type='dropdown'
/>
<cms:editable name="start_time" label="Time From (24 Hrs)"
opt_values='08:00 | 08:30 | 09:00 | 09:30 | 10:00 | 10:30 | 11:00 | 11:30 |
12:00 | 12:30 | 13:00 | 13:30 | 14:00 | 14:30 | 15:00 | 15:30 |
16:00 | 16:30 | 17:00 | 17:30 | 18:00 | 18:30 | 19:00 | 19:30 |
20:00 | 20:30 | 21:00'
type='dropdown'
/>
</cms:template>
<cms:form
masterpage='booking.php'
mode='create'
enctype="multipart/form-data"
method='post'
anchor='0'
>
Booking Name:<br />
<cms:input name='k_page_title' type='bound' /><br />
Notes:<br />
<cms:input name='desc' type='bound' /><br />
Staff Member:<br />
<cms:input name='staff_member' type='bound' /><br />
Date:<br />
<cms:input name='k_publish_date' type='bound' /><br />
Time:<br />
<cms:input name='start_time' type='bound' /><br />
<input type="submit" name="submit" value="Save"/>
</cms:form>