Created
May 26, 2020 15:00
-
-
Save New0/fbffe741e00f21a8bf34649251570c31 to your computer and use it in GitHub Desktop.
Set the Caldera Forms text field with date Type to only allow future dates to be picked.
This file contains hidden or 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 | |
add_filter( 'caldera_forms_field_attributes', function( $attrs, $field ){ | |
//EDIT FIELD ID | |
if( $field['ID'] === "fld_7194486" ){ | |
$attrs[ 'min' ] = date("Y-m-d"); | |
} | |
return $attrs; | |
}, 20, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment