<?php
/**
* Gravity Perks // Nested Forms // Re-order Display Fields
* http://gravitywiz.com/documentation/gravity-forms-nested-forms/
*/
// Update "123" to your form ID.
add_filter( 'gform_pre_render_123', function( $form ) {
foreach( $form['fields'] as &$field ) {
// Update "2" to your Nested Form field ID.
if( $field->id = 2 ) {
// Update "1, 2, 3" to the field IDs from your child form and put them in the desired order.
$field->gpnfFields = array( 1, 2, 3 );
}
}
return $form;
} );