Schedule Notifications by gAppoinments Date

Use this snippet to map the date selected in a gAppointments Booking Calendar field to a Gravity Forms Date field. Then, schedule your notifications based on the Date field.

Code

Filename: gpns-schedule-by-gappointments-date.php

<?php
/**
 * Gravity Wiz // Notification Scheduler // Schedule Notifications by gAppoinments Date
 * https://gravitywiz.com/documentation/gravity-forms-notification-scheduler/
 *
 * Use this snippet to map the date selected in a gAppointments Booking Calendar field to a Gravity Forms Date field.
 * Then, schedule your notifications based on the Date field.
 */
// Update "123" to the ID of your form.
add_action( 'gform_pre_submission_123', function( $form ) {
	// Update "4" to the ID of your Booking Calendar field.
	$appointment = unserialize( $_POST['input_4'] );
	// Update "5" to the ID of your Date field.
	$_POST['input_5'] = rgar( $appointment, 'date' );
} );

Leave a Reply

Your email address will not be published. Required fields are marked *

  • Trouble installing this snippet? See our troubleshooting tips.
  • Need to include code? Create a gist and link to it in your comment.
  • Reporting a bug? Provide a URL where this issue can be recreated.

By commenting, I understand that I may receive emails related to Gravity Wiz and can unsubscribe at any time.