diff --git a/includes/class-evf-smart-tags.php b/includes/class-evf-smart-tags.php index 985d8d0f4..898901c25 100644 --- a/includes/class-evf-smart-tags.php +++ b/includes/class-evf-smart-tags.php @@ -569,7 +569,12 @@ public function process( $content, $form_data, $fields = '', $entry_id = '' ) { break; case 'entry_id': - $content = str_replace( '{' . $other_tag . '}', $entry_id, $content ); + if ( ! empty( $entry_id ) ) { + $content = str_replace( '{' . $other_tag . '}', $entry_id, $content ); + } else { + $form_entry_id = ! empty( $form_data['entry']['id'] ) ? absint( $form_data['entry']['id'] ) : ''; + $content = str_replace( '{' . $other_tag . '}', $form_entry_id, $content ); + } break; default: