Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Title: create a merge tag of {entry_time}
- // use a Hidden field and give it the value of {entry_time} you can then add the following code to your
- // theme functions.php file to replace that merge tag with the time on submission.
- add_filter( 'gform_save_field_value', 'replace_entry_time', 10, 4 );
- function replace_entry_time( $value, $lead, $field, $form ) {
- $value = str_replace("{entry_time}", date("H:i:s"), $value);
- return $value;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement