Parent Entry ID and Parent Form ID
When someone submits a form through a View’s Gravity Forms field, GravityView saves two extra values with the new entry: the ID of the entry the form was shown with, and the ID of that entry’s form. They link the new entry to the one it came from, such as a review to the restaurant it’s about.
What the two values hold #
- Parent Entry ID (
gk_parent_entry_id) is the entry the form was submitted from, in a row on the Multiple Entries page or on a Single Entry page. - Parent Form ID (
gk_parent_form_id) is the form of that entry, which is the View’s form.
Gravity Forms calls values like these entry meta. Only entries submitted through the Gravity Forms field have them. An entry submitted from the form on a page or imported with GravityImport has neither.
Show them in a View #
From GravityView 3.11.0, both values are fields in the View editor:
- Edit the View that shows the submitted form’s entries, such as the reviews.
- Click Add Field (or Add Table Column) in a layout.
- Click Parent Entry ID or Parent Form ID. They’re listed after the form’s own fields.

The columns show the IDs each entry was saved with and stay empty for entries submitted any other way. In a Table View with Enable sorting by column turned on, visitors can sort by either column. The Sort by field setting and the Search Bar’s search fields don’t list them.
Show the entries submitted from one entry #
To list a restaurant’s reviews on its Single Entry page, add a GravityView View field to the Single Entry layout, choose the reviews View, and filter it on Parent Entry ID:
- Search field:
gk_parent_entry_id - Search operator:
is - Search value:
{entry_id}
Each restaurant’s page then lists only the reviews submitted from that page. How to embed a View inside another View to show related entries walks through these settings, and Creating a review/voting system by embedding a form into a single entry builds the whole review page.
To use the [gravityview] shortcode instead, put it in a Custom Content field on the Single Entry page with search_field="gk_parent_entry_id", search_value="{entry_id}", and the reviews View’s secret attribute. Enable Enhanced Security: the secret attribute for shortcodes explains it.
With GravityView Pro, Connected Views can link each restaurant to its reviews with no filter to set up.
See them in Gravity Forms #
On the form’s Entries screen in Gravity Forms, click the gear icon at the right end of the column headers. Parent Entry ID and Parent Form ID are in the list of columns you can add.
Join forms on Parent Entry ID with Multiple Forms #
The Multiple Forms join editor lists a form’s own fields plus Entry ID and User ID, without GravityView’s Parent Entry ID. To join the restaurants form’s Entry ID to the reviews form’s Parent Entry ID, add it to the list with the gravityview_multiple_forms/allow_join_on filter:
/**
* Lists Parent Entry ID in the Multiple Forms join editor.
*
* @param array $allowed Entry meta keys and entry properties a join can
* match on.
*
* @return array The keys, with gk_parent_entry_id added.
*/
add_filter(
'gravityview_multiple_forms/allow_join_on',
function ( $allowed ) {
$allowed[] = 'gk_parent_entry_id';
return $allowed;
}
);Note: Adding custom PHP code snippets to your website shows where to put this code.
Then choose Parent Entry ID on the reviews form’s side of the join. The View shows one row for each review, with the restaurant’s fields beside it, and a restaurant with no reviews keeps one row with the review columns blank.
