Gravity Forms get merge tag token value

I am doing some customization for catching gravity form results on form submission. I get feed[‘meta’] array on form submission. But some fields have merge tag values like ‘{form_title}’. I need to get real value of the field instead of tokens. Following is the array I get on form submission.

Array
(
  [name] => contact_test
  [form_id] => 1
  [contact_count] => 2
  [type] => Contacts
  [signature_text_2] => {Name (Prefix):2.2}{Name (Suffix):2.8}
  [signature_html_2] => {Name (Suffix):2.8}{Name (Prefix):2.2}
)

I am having issues with last 2 fields where merge tags tokens are present. I need to fetch value of the corresponding fields.

Related posts

Leave a Reply

1 comment

  1. GFCommon::replace_variables() worked for me. Just need to pass the token like {Name (Prefix):2.2}, form object, lead object. Remaining all are format specific options. The function is in gravityforms common.php file.