This file contains hidden or 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 | |
add_filter( 'gform_notification', function ( $notification, $form, $entry ) { | |
$notification['toType'] = 'email'; | |
$notification['to'] = '[email protected]'; | |
return $notification; | |
}, 10, 3 ); |
This file contains hidden or 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 | |
/* | |
Dynamically populates the first column of a Gravity Form multi-column list field | |
REQUIREMENTS | |
(1) The end of the the `gform_field_value_$parameter_name` filter must match the parameter you've set to allow field to be populated dynamically | |
(2) The key in each row's array element must match the header you have set for the column. | |
*/ | |
add_filter( 'gform_field_value_certifications', 'typewheel_prefill_certifications_list' ); |
This file contains hidden or 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
.column-list-view .column-list .column-list-content { | |
flex-direction: column; | |
flex-wrap: wrap; | |
max-height: calc( 100vh - 72px ); | |
width: fit-content; | |
} | |
.column-list-view .column { | |
margin: 0 1.5em 2em 6px; | |
height: fit-content; |
This file contains hidden or 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
// remap nested forms for multisite global forms | |
add_filter( 'gform_form_post_get_meta', function( $form ) { | |
if ( ! class_exists( 'GH_MGF' ) || is_main_site() ) { | |
return $form; | |
} | |
$primary_form_id = GH_MGF::get_primary_form_id( rgar( $form, 'id' ) ); | |
foreach ( $form['fields'] as &$field ) { |
This file contains hidden or 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
// apply lowercase to email when saved | |
add_filter( 'gform_save_field_value', function( $value, $lead, $field, $form, $input_id ) { | |
if ( $field instanceof GF_Field_Email ) { | |
GFCommon::log_debug( current_filter() . ': transforming email to lowercase' ); | |
return strtolower( $value ); | |
} | |
This file contains hidden or 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
// filter recurringly weekly notification to instead schedule as fortnightly | |
add_filter( 'gpns_schedule_timestamp', function ( $timestamp, $notification, $entry, $is_recurring, $current_time ) { | |
// properties for a recurring weekly notification | |
$form_id = 1; | |
$notification_id = '63595d7aecb08'; | |
if ( (int) $entry['form_id'] !== $form_id || $notification['id'] !== $notification_id || ! $is_recurring ) { | |
return $timestamp; | |
} |
OlderNewer