Skip to main content

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.

ProductMagic Links
RequiresMagic Links 1.0 or later
Needs an entryYes. Its value comes from a form entry.

Attributes

NameTypeRequiredDefaultDescription
view_id=numberYes—The View to edit the entry in. Without it, the tag outputs nothing.
post_id=numberNo0The page the View is on. Defaults to the View itself.
text=textNoEdit EntryThe text of the link. Ignored when format is url. Defaults to Edit Entry, or Delete Entry when action is delete.
action=one of the valuesNoeditWhat 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=textNolinkCase-sensitive. Any value other than url renders a link.

Values for Action

ValueDescription
editEdit the entry (default)
deleteDelete the entry

Values for Output format

ValueDescription
linkLink (default)
urlJust 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 tagOutput
{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