Use “Nested Entries All” Template for GravityView’s Single Entry View

Code

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

<?php
/**
 * Gravity Perks // Nested Forms // Use "Nested Entries All" Template for GravityView's Single Entry View
 * https://gravitywiz.com/documentation/gravity-forms-nested-forms/
 */
add_filter( 'gpnf_template_args', function( $args ) {
	if ( $args['template'] === 'nested-entries-detail-simple' && $args['field']->is_gravityview() ) {
		$args['template'] = 'nested-entries-all';
	}
	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.