Use “Nested Entries Simple” Template for GravityView’s Entries View

Code

Filename: gpnf-gv-nested-entries-simple-template.php

<?php
/**
 * Gravity Perks // Nested Forms // Use "Nested Entries Simple" Template for GravityView's Entries View
 * https://gravitywiz.com/documentation/gravity-forms-nested-forms/
 */
add_filter( 'gpnf_template_args', function ( $args ) {
	if ( $args['template'] === 'nested-entries-count' && function_exists( 'gravityview' ) && gravityview()->request->is_renderable() ) {
		$args['template'] = 'nested-entries-detail-simple';
	}

	return $args;
} );

Leave a Reply

Your email address will not be published. Required fields are marked *

  • Trouble installing this snippet? See our troubleshooting tips.
  • Need to include code? Create a gist and link to it in your comment.
  • Reporting a bug? Provide a URL where this issue can be recreated.

By commenting, I understand that I may receive emails related to Gravity Wiz and can unsubscribe at any time.