Created
June 10, 2017 00:52
-
-
Save spivurno/f4a5f8adcb03c58aadadde06fa5a6cef to your computer and use it in GitHub Desktop.
Gravity Wiz // Gravity Forms // Modify Date Field Format in Entries
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 | |
/** | |
* Gravity Wiz // Gravity Forms // Modify Date Field Format in Entries | |
* http://gravitywiz.com/ | |
*/ | |
// Replace "123" with your form ID and "7" with your Date field ID. | |
add_filter( 'gform_get_input_value_123_7', function( $value ) { | |
// See PHP date() documentation for more details on date formatting: http://php.net/manual/en/function.date.php | |
$date_format = 'l, m/d/Y'; // i.e. Tuesday, 01/13/1987. | |
return date( $date_format, strtotime( $value ) ); | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment