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
/** | |
* Performs spam check and returns result to Gravity Forms. | |
* | |
* @param bool $is_spam Indicates if the entry is to be marked as spam. | |
* @param array $form The form currently being processed. | |
* @param array $entry The entry being evaluated. | |
* | |
* @return bool | |
*/ | |
function your_gform_entry_is_spam_callback( $is_spam, $form, $entry ) { |
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
add_filter( 'gform_field_validation', function ( $result, $value, $form, $field ) { | |
if ( ! $result['is_valid'] && $field->get_input_type() === 'email' && GFCommon::is_valid_email_list( $value ) ) { | |
$result['is_valid'] = true; | |
$result['message'] = ''; | |
} | |
return $result; | |
}, 10, 4 ); |
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
add_filter( 'gform_pre_replace_merge_tags', function ( $text, $form, $entry ) { | |
if ( strpos( $text, '{workflow_cancel_link}' ) === false || empty( $entry ) || ! class_exists( 'Gravity_Flow_Merge_Tags' ) ) { | |
return $text; | |
} | |
$api = new Gravity_Flow_API( $form['id'] ); | |
$step = $api->get_current_step( $entry ); | |
if ( ! $step ) { | |
return $text; |
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 | |
/** | |
* Gravity Wiz // Gravity Perks // Get Sum of Nested Form Fields | |
* | |
* Get the sum of a column from a Gravity Forms List field. | |
* | |
* @version 1.2 | |
* @author David Smith <[email protected]> | |
* @license GPL-2.0+ | |
* @link http://gravitywiz.com/... |
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
class RW_GF_Rating_Field_Logic { | |
public function __construct() { | |
add_action( 'init', array( $this, 'init' ) ); | |
} | |
function init() { | |
if ( ! property_exists( 'GFForms', 'version' ) || ! version_compare( GFForms::$version, '1.9.10', '>=' ) ) { | |
return; | |
} |
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 | |
class RW_GF_Age_Calculation { | |
public function __construct() { | |
add_action( 'init', array( $this, 'init' ) ); | |
} | |
function init() { | |
if ( ! class_exists( 'GFForms' ) || ! property_exists( 'GFForms', 'version' ) && version_compare( GFForms::$version, '1.9', '>=' ) ) { |
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 | |
class RW_GF_Total_Field_Logic { | |
public function __construct() { | |
add_action( 'init', array( $this, 'init' ) ); | |
} | |
function init() { | |
if ( ! property_exists( 'GFForms', 'version' ) || ! version_compare( GFForms::$version, '1.9', '>=' ) ) { | |
return; |
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
/* | |
Trigger conditional logic by adding an onclick or onchange event to your custom field input or by using something like the following | |
jQuery('#input_8_1 :input').on('change', function () { | |
gf_apply_rules(8, [2, 3, 4]); | |
}); | |
*/ | |
add_filter( 'gform_pre_render', 'extend_conditional_logic_frontend' ); | |
function extend_conditional_logic_frontend( $form ) { |
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 | |
add_filter( 'gform_pre_render', 'log_pre_render' ); | |
function log_pre_render( $form ) { | |
GFCommon::log_debug( "log_pre_render(): \$form => " . print_r( $form, true ) ); | |
return $form; | |
} | |
add_action( 'gform_pre_process', 'log_pre_process' ); | |
function log_pre_process( $form ) { |
NewerOlder