PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Email Notifications - encode / obfuscate merge tag values

  1. lohck
    Member

    I am including in the notification email template, a link with a couple of parameters built using merge tags.

    eg. http://domain.com/page.php?a={merge tag}&b= ......

    Is there a way to encode / obfuscate the parameters values? I tried using base64_encode({merge tag}) but realised php is not processed in the notification template.

    Posted 11 years ago on Tuesday June 18, 2013 | Permalink
  2. David Peralty

    Your best bet would be to have hidden fields in your form, and use our pre_submission hook to grab the submitted values, obfuscate them, and then push them to your hidden fields. Then you would be able to grab them with a normal merge tag.

    Posted 11 years ago on Wednesday June 19, 2013 | Permalink
  3. lohck
    Member

    Hi David, thanks for pointing me to the right direction, have got things setup nicely following your tips.

    Finally, how to I prevent those hidden fields (which holds the obfuscated values) from showing up in email notifications?

    Posted 11 years ago on Thursday June 20, 2013 | Permalink
  4. David Peralty

    For that, you would have to build out your notification manually rather than using the {all_fields} tag.

    Posted 11 years ago on Thursday June 20, 2013 | Permalink
  5. Isn't there the {all_fields:nohidden} merge tag to prevent hidden fields from showing up in emails?

    Posted 11 years ago on Monday June 24, 2013 | Permalink
  6. David Peralty

    There is, but it depends on how the field was hidden. If he used CSS/JS to hide the field versus the hidden field type, then it will still show in the notifications. See all of our Merge Tag details here: http://www.gravityhelp.com/documentation/page/Merge_Tags

    Posted 11 years ago on Monday June 24, 2013 | Permalink

This topic has been resolved and has been closed to new replies.