Skip to content

Instantly share code, notes, and snippets.

@ForGravity
ForGravity / gw-gravity-forms-export-multi-input-fields-single-colum.php
Last active January 17, 2019 18:56 — forked from spivurno/gw-gravity-forms-export-multi-input-fields-single-colum.php
Gravity Wiz // Gravity Forms // Export Multi-input Fields in a Single Column
<?php
/**
* Gravity Wiz // Gravity Forms // Export Multi-input Fields in a Single Column
*
* By default, Gravity Forms only allows you to export each input of a multi-input field (e.g. Checkbox field,
* Name Field, etc) as a separate column. This snippet allows you to export all inputs (of a specific field) in a
* single column.
*
* @version 1.2
* @author David Smith <[email protected]>
<?php
add_filter( 'fg_fillable_pdf_args', 'add_list_field_to_pdf', 10, 4 );
function add_list_field_to_pdf( $pdf_meta, $feed, $entry, $form ) {
// Prepare column names for each day of the week.
$column_names = array(
'Sunday %d',
'Monday %d',
<?php
add_filter( 'fg_entryautomation_search_criteria', 'only_automate_failed_payments', 10, 3 );
function only_automate_failed_payments( $search_criteria, $feed, $form ) {
$search_criteria['field_filters'][] = array( 'key' => 'payment_status', 'value' => 'Failed' );
return $search_criteria;
<?php
add_filter( 'fg_entryautomation_maximum_attachment_size', 'increase_attachment_size', 10, 4 );
function increase_attachment_size( $maximum_file_size, $settings, $form, $file_name ) {
return 10485760;
}
<?php
add_filter( 'fg_entryautomation_export_email_subject', 'subject_date_range', 10, 4 );
function subject_date_range( $subject, $settings, $form, $file_name ) {
// Get search criteria.
$search_criteria = fg_entryautomation()->get_search_criteria( $settings, $form );
// Add date range to subject.
<?php
add_filter( 'fg_entryautomation_export_email_message', 'add_payment_summary', 10, 4 );
function add_payment_summary( $message, $settings, $form, $file_name ) {
// Get search criteria.
$search_criteria = fg_entryautomation()->get_search_criteria( $settings, $form );
// Get entries for search criteria.
<?php
add_filter( 'fg_easypassthrough_populate_same_form', '__return_false' );