Merge tag {gv_magic_link view_id=123 text="Click here"}
Magic Link. A link that lets the recipient edit their entry without logging in. Needs a View ID; without one, or if the link fails, the tag outputs nothing.
On the test entry, {gv_magic_link format="url" view_id=1882} gives http://fixture.gravitykit.test/?gravityview=merge-tag-reference&entry=5001&edit=cb2484c3d5&gvid=1882&gv_magic=3706a9739e2800dc679659e00996bc03d51c255b161a9bcfb821dd59f44b05f2&gv_email=YWRhQGV4YW1wbGUuY29t.
| Product | Magic Links |
|---|
| Requires | Magic Links 1.0 or later |
|---|
| Needs an entry | Yes. Its value comes from a form entry. |
|---|
Attributes
| Name | Type | Required | Default | Description |
|---|
view_id= | number | Yes | — | The View to edit the entry in. Without it, the tag outputs nothing. |
post_id= | number | No | 0 | The page the View is on. Defaults to the View itself. |
text= | text | No | Edit Entry | The text of the link. Ignored when format is url. Defaults to Edit Entry, or Delete Entry when action is delete. |
action= | one of the values | No | edit | What the link does. Any other value means edit. A delete link is empty unless the View allows deleting through magic links. Needs Magic Links 1.2.0 or newer; earlier versions always make an edit link. |
format= | text | No | link | Case-sensitive. Any value other than url renders a link. |
Values for Action
| Value | Description |
|---|
edit | Edit the entry (default) |
delete | Delete the entry |
Values for Output format
| Value | Description |
|---|
link | Link (default) |
url | Just the URL. The only value that changes the output. |
Other values are accepted too.
Examples
Output from the real plugin code, run on a test entry.
| Merge tag | Output |
|---|
{gv_magic_link format="url" view_id=1882} | http://fixture.gravitykit.test/?gravityview=merge-tag-reference&entry=5001&edit=cb2484c3d5&gvid=1882&gv_magic=3706a9739e2800dc679659e00996bc03d51c255b161a9bcfb821dd59f44b05f2&gv_email=YWRhQGV4YW1wbGUuY29t |