Using the Custom Content field
A Custom Content field shows your own text, HTML, shortcodes, and merge tags with each entry in a View. Its merge tags fill in that entry’s values, so one field gives every entry its own sentence or link.
To show the same content once, above or below the entries, use a Custom Content widget instead. Custom Content as a widget or as a field explains the difference.
Add a Custom Content field #
- Edit your View and open the tab where the content should appear: Multiple Entries Layout, Single Entry Layout, or Edit Entry Layout.
- Click Add Field. In a table layout, the button is Add Table Column.
- Click Custom Content at the top of the list.
- Click the gear icon on the new field to open Custom Content Settings.
- Type your content in the Custom Content box, click Close, and save the View.

Note: A Custom Content field can’t be sorted. Its column gets no sort link when Enable sorting by column is on, and the Sort by field setting doesn’t list it.
Show entry values with merge tags #
A merge tag is a placeholder for one of the entry’s values. In {Phone:4}, Phone is the field’s label and 4 is its field ID, which is the part that picks the value. This content gives each member of a directory a line with their own first name and phone number:
Call {Name (First):1.3} at {Phone:4}To pick a merge tag from a list, click the Insert merge tag icon beside the box, or type { in the box. Both open a list of merge tags grouped by type, with the form’s Fields first and each field’s ID beside its name. Click one to insert it where the cursor is.

A Name field has one merge tag for each part, such as {Name (First):1.3} for the first name and {Name (Last):1.6} for the last name. {Name:1} on its own shows nothing. A field the entry left empty shows nothing either.
Merge Tags lists the merge tags you can use, and GravityView merge tag modifiers explains the options that change their output, such as showing a value in capital letters.
Add HTML #
The box takes HTML, and a merge tag can go inside an HTML attribute. This link opens each member’s website:
<a href="{Website:5}">Visit website</a>For a member with no website, the link still shows, with an empty address. The shortcode in the next section hides it for them.
A line that starts with spaces gets the warning “Please use tab for indentation.” It doesn’t stop the View from saving.
Use shortcodes #
Shortcodes run after the merge tags are filled in, so a merge tag can go inside a shortcode. This version of the link uses the [gvlogic] shortcode to show it only when the Website field has a value:
[gvlogic if="{Website:5}" isnot=""]
<a href="{Website:5}">Visit website</a>
[/gvlogic]In the directory below, the Phone and Website columns are two Custom Content fields with the samples above. Daniel Okafor has no website, so his row has no link.

Show all of an entry’s fields #
{all_fields} shows every field the entry has a value for, each with its label. Fields left empty are skipped. In the Insert merge tag list, it is All submitted fields under Entry properties.
When the Single Entry page uses the Table layout, turn on Full width in the field’s settings. The field then fills the whole row without its label.

Show each entry as an accordion #
With HTML’s <details> element, each entry becomes an item that opens when clicked. This sample shows each member’s name, and their About text opens below it:
<details>
<summary>{Name (First):1.3} {Name (Last):1.6}</summary>
{About:2}
</details>Replace the field IDs with your own.

Field settings #
Automatically add paragraphs to content is off for a new field. With it off, the content is printed as you typed it, so the browser joins lines of plain text together. With it on, each block of text separated by a blank line becomes a paragraph, and single line breaks are kept. Turn it on when the content is plain text.
Render oEmbeds turns a video address on its own line, such as a YouTube link, into a player. See Displaying video, audio, and media links as a player using the Custom Content field.
On the Edit Entry page #
On the Edit Entry Layout tab, the field shows its content inside the edit form, with merge tags filled in from the entry being edited. Use it for a note to the person editing:
You are editing the listing for {Name (First):1.3} {Name (Last):1.6}.More examples #
- Passing a field value from the View to a form on another page
- Using GravityMath inside a GravityView Custom Content field
- Calculating a person’s age based on a date field
- Adding a Print button to the Single Entry page
- Placing two fields side-by-side in the same column
- How to display entry revisions on your website