Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Gravity Wiz // Gravity Forms // Modify Date Field Format in Entries
<?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
You can’t perform that action at this time.