Disable All Dates & Set Enabled Dates via Exceptions

Instructions

Code

Filename: gpld-disable-all-dates-with-exceptions.php

<?php
/**
 * Gravity Perks // Limit Dates // Disable All Dates & Set Enabled Dates via Exceptions
 * https://gravitywiz.com/documentation/gravity-forms-limit-dates/
 *
 * Instruction Video: https://www.loom.com/share/46883f47e71447108f70fd725af8ee97
 */
add_filter( 'gpld_limit_dates_options_123_1', function( $options, $form, $field ) {

	$options['exceptionMode'] = 'enable';
	$options['disableAll']    = true;

	return $options;
}, 10, 3 );

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.