Created
February 7, 2019 16:00
-
-
Save doekenorg/48157d53a1f8b9c1b09ace85448519ed to your computer and use it in GitHub Desktop.
Make Gravity Perks Nested Forms work with Entries in Excel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//functions.php | |
add_filter('gfexcel_field_value_form', function ($value, $entry, \GF_Field $field) { | |
$entries = gp_nested_forms()->get_entries($value); | |
$nested_form = \GFAPI::get_form(rgar($field, 'gpnfForm')); | |
$entries = array_map(function ($entry) use ($nested_form) { | |
return \GFCommon::get_submitted_fields($nested_form, $entry, false, false, 'text', false); | |
}, $entries); | |
return implode("-----------\n", $entries); | |
}, 10, 3) |
Your theme should have a functions.php file.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hi
where I have to put this function.php? in plugin>gf-entries-in-excel or elsewhere?
Thank you