Simply Schedule Appointments is a WordPress schedule plugin for creating a booking calendar. Appointment types and time slots can be selected and then included directly in your form.
Download and install
- If you haven't already done so, install and activate Formidable Forms Pro.
- Install and activate a premium version of Simply Schedule Appointments.
Create an Appointments booking form
- Create a new appointment type by following the instructions in the Simply Schedule Appointments docs.
- Go to Formidable → Add New to create a new appointment booking form.
- In the form builder, add the new Appointment field to let people choose a time slot.
- In the field settings, choose which appointment type people can book through this form. You can either include all or a specific appointment type.
- Click the Update button to save your form.
Additional customizations
This code example can be added to a child theme's functions.php file or the Code Snippets plugin.
Copy the Appointments field value
If you want to copy the value selected in the Appointments field, use the following example. You can adjust the date to be 21 days after by handling it in a submission webhook. This example does this on page load.
add_action( 'init', 'test_ssa', 99 ); function get_display_value_from_ssa( $value ) { $field = FrmField::getOne( 82 ); $type = new SsaFrmFieldAppointment( $field, 'ssa-appointment' ); return $type->get_display_value( $value ); } function get_ymd_format_from_ssa( $value ) { $field = FrmField::getOne( 82 ); $type = new SsaFrmFieldAppointment( $field, 'ssa-appointment' ); $fdygia_format = $type->get_display_value( $value ); $timestamp = strtotime( $fdygia_format ); return date( 'Y-m-d', $timestamp ); } function test_ssa() { echo 'display value: ' . get_display_value_from_ssa( 2 ); echo '<br>'; $ymd_format = get_ymd_format_from_ssa( 2 ); echo 'ymd: ' . $ymd_format; echo '<br>'; echo '+21 days: ' . date( 'Y-m-d', strtotime( $ymd_format . ' + 21 days' ) ); echo '<br>'; die(); }