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 );
It seems that if I apply this snippit that it applies to all forms. Is it also possible that I apply this snippit only to form X? Sorry but I have pretty little understanding of PHP/Javascript etc. So maybe it’s a stupid question.
Hi Emiel,
The snippet in its current form is designed to apply to a specific form and a specific date field on the form. You’ll update ‘123’on the hook name to the form ID and 1 to the Date field ID.
add_filter( 'gpld_limit_dates_options_123_1', function( $options, $form, $field ) {
If you’re experiencing different, please submit a ticket via our support form, so we look into this further on your website.
Best,