Created
July 14, 2021 19:53
-
-
Save jorpdesigns/39e48d592c7f1874eda57a152eecc1e6 to your computer and use it in GitHub Desktop.
Snippet to show custom value for Gravity Forms field on entry page
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( 'gform_entry_field_value', function ( $value, $field, $entry, $form ) { | |
if ( '10' == $field->id && '4' == $form['id'] ) { // Replace 10 with your field id & 4 with your form id | |
$value = 'Custom Value'; | |
} | |
return $value; | |
}, 10, 4 ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment