The {gv_magic_links} Merge Tag
The GravityView Magic Links plugin provides a merge tag that allows you to generate magic links for entry editing.
Basic Usage
The basic merge tag syntax requires a View ID:
{gv_magic_link view_id=123}
This will output a link with the default text "Edit Entry".
Parameters
The merge tag supports the following parameters:
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
view_id |
integer | Yes | None | The ID of the View to generate the magic link for. |
post_id |
integer | No | View ID | The ID of the post/page where the View is embedded. If not provided, uses the View ID. |
text |
string | No | "Edit Entry" | The text to display for the link. |
format |
string | No | "link" | The output format. Use "url" to get just the URL without link formatting. |
Examples
Basic Link (Required View ID)
{gv_magic_link view_id=123}
Output: <a href="...">Edit Entry</a>
Custom Link Text
{gv_magic_link view_id=123 text="Click here"}
Output: <a href="...">Click here</a>
Specific View and Post
{gv_magic_link view_id=123 post_id=456}
Output: <a href="...">Edit Entry</a>
URL Format (No Link)
{gv_magic_link view_id=123 format="url"}
Output: https://example.com/...
URL Format with Post ID
{gv_magic_link view_id=123 post_id=456 format="url"}
Output: https://example.com/...
Link Format with Custom Text
{gv_magic_link view_id=123 format="link" text="Click here"}
Output: <a href="...">Click here</a>
Usage in Gravity Forms
You can use this merge tag in any Gravity Forms field that supports merge tags, such as:
- HTML fields
- Text fields
- Email notifications
- Confirmation messages
Notes
- The
view_id
parameter is required. If not provided, the merge tag will output an empty string. - The magic link will only work for entries that have a valid email address in the configured email field.
- The link will expire based on the View's magic link expiration settings.