Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Gravity Perks // GP Conditional Logic Dates // Adjust User's Local Time to UTC
<?php
/**
* Gravity Perks // GP Conditional Logic Dates // Adjust User's Local Time to UTC
* http://gravitywiz.com/documentation/gravity-forms-conditional-logic-dates/
*/
// Update "123" to the ID of your form - or - remove to apply to all forms.
add_action( 'gform_pre_render_123', function( $form ) {
add_action( 'wp_footer', 'gpcld_enable_utc_timezone_script' );
add_action( 'gform_preview_footer', 'gpcld_enable_utc_timezone_script' );
function gpcld_enable_utc_timezone_script() {
?>
<script>
gform.addFilter( 'gpcld_enable_utc_timezone', function( enable ) {
return true;
} );
</script>
<?php
}
return $form;
} );
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.