Created
September 13, 2017 10:16
-
-
Save kenmasters/7cb7a2c41e1e00ea6c6323945fef321e to your computer and use it in GitHub Desktop.
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
// Limit maximum year to current year | |
add_filter( 'gform_date_max_year', 'set_max_year' ); | |
function set_max_year( $max_year ) { | |
return date('Y', current_time('timestamp')); | |
} | |
// Reference: https://www.gravityhelp.com/documentation/article/gform_date_max_year/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment