Last active
September 23, 2022 15:53
-
-
Save spivurno/3708480 to your computer and use it in GitHub Desktop.
Gravity Wiz // Populate Date: Year from Current Date
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Populate Date: Year from Current Date | |
*/ | |
add_filter('gform_field_value_year_from_date', 'gw_year_from_date'); | |
function gw_year_from_date() { | |
return date('Y-m-d', strtotime('+1 year')); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
👉 This Gist has been migrated to the Gravity Wiz Snippet Library:
https://github.com/gravitywiz/snippet-library/blob/master/gravity-forms/gw-populate-date-year-from-today.php