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( 'gpeb_queryer_entries', function( $entries, $gf_queryer ) { | |
// Update the form ID to match your form. | |
if ( $gf_queryer->form_id != 933 ) { | |
return $entries; | |
} | |
// Update the field IDs to match your form. |
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
const sourceFieldId = 37; // Replace with the ID of the source field (Field A) | |
// Track completion of required events | |
let postRenderComplete = false; | |
let minDateComplete = false; | |
let formId; | |
let calculationTimeout; | |
function checkAndRunCalculations() { | |
if (postRenderComplete && minDateComplete) { |
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( 'gcgs_gppa_query_builder_args', function( $query_builder_args, $args, $object ) { | |
/** @var string|string[] */ | |
$filter_value = null; | |
/** @var array */ | |
$filter = null; | |
/** @var int */ | |
$filter_group_index = null; |
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_action( 'gform_entry_post_save', function( $entry ) { | |
$form = GFAPI::get_form( $entry['form_id'] ); | |
foreach ( $form['fields'] as $field ) { | |
if ( $field->get_input_type() === 'html' ) { | |
// Save HTML field content into entry meta | |
gform_update_meta( $entry['id'], 'html_field_' . $field->id, $field->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
<?php | |
add_filter( 'gform_shortcode_entry_count', 'gwiz_entry_count_shortcode', 10, 2 ); | |
function gwiz_entry_count_shortcode( $output, $atts ) { | |
$email_field_id = 1; // Replace with your the email field ID. | |
// phpcs:ignore WordPress.PHP.DontExtract.extract_extract | |
extract( shortcode_atts( array( | |
'id' => false, | |
'status' => 'total', // accepts 'total', 'unread', 'starred', 'trash', 'spam' | |
'format' => false, // should be 'comma', 'decimal' |
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_replace_merge_tags', function ( $text, $form, $entry ) { | |
$pick = ''; | |
if ( $text == '@{:1} @{:3} @{:10}' ) { | |
$trigger_field_id = 8; | |
$trigger_field_value = rgpost( 'input_' . $trigger_field_id ); | |
if ( $trigger_field_value == 'First Choice' ) { | |
$pick = '1'; |
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( 'gcgs_gppa_query_builder_args', function( $query_builder_args, $args, $object ) { | |
/** @var string|string[] */ | |
$filter_value = null; | |
/** @var array */ | |
$filter = null; |
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( 'gcgs_gppa_query_builder_args', function( $query_builder_args, $args, $object ) { | |
/** @var string|string[] */ | |
$filter_value = null; | |
/** @var array */ | |
$filter = null; |
NewerOlder