---
title: "The {gv_magic_links} Merge Tag"
date: 2026-04-23
author: "GravityKit"
link: "https://www.gravitykit.com/docs/gravityview-pro/magic-links/the-gvmagiclinks-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. |
| `action` | string | No | "edit" | The action the magic link performs. Use "delete" for deletion links. |

## Examples

### Basic Link (Required View ID)

`{gv_magic_link view_id=123}` Output: `Edit Entry`

### Custom Link Text

`{gv_magic_link view_id=123 text="Click here"}`

Output: `Click here`

### Specific View and Post

`{gv_magic_link view_id=123 post_id=456}` Output: `Edit Entry`

### 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: `Click here`

### Deletion Link

`{gv_magic_link view_id="123" action="delete"} ` Output: `Delete Entry`

Deletion Link with Custom Text

`{gv_magic_link view_id="123" action="delete" text="Click to Delete"}` Output: ` Click to Delete`

## 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.