How am I able to put the edit and trash link directly in the administrator email?
How am I able to put the edit and trash link directly in the administrator email?
The trash functionality is handled with JavaScript and a logged in nonce, so I don't believe you can include that link directly in the admin notification email. Try trashing an entry from the entry view and you will see what I mean: there is no URL to include.
You can include a link to edit the entry though. You will have to build it yourself.
First part of the link:
http://example.com/wp-admin/admin.php?page=gf_entries&view=entry&
(the "& amp ;" above should just be an ampersand. The forum software here changed it.)
Change example.com and the wp-admin location to those values which are correct for your site.
Then you need id (form ID and lid (lead ID)
id{form_id}&lid={entry_id}
Put it all together:
http://example.com/wp-admin/admin.php?page=gf_entries&view=entry&id{form_id}&lid={entry_id}
Maybe you want to do this in your notification email:
<a href="http://example.com/wp-admin/admin.php?page=gf_entries&view=entry&id{form_id}&lid={entry_id}" title="edit this entry">Edit this entry</a>