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; |
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 | |
| /** | |
| * Gravity Wiz // Gravity Forms // Conditional Readonly Fields | |
| * https://gravitywiz.com/ | |
| * | |
| * This simple snippet will mark a field as readonly if a given source field has a specific value. | |
| * | |
| * Instructions: | |
| * | |
| * 1. Install this snippet with our free Code Chest plugin. |
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( 'gppa_get_batch_field_html', 'capture_acf_address_new', 10, 6 ); | |
| function capture_acf_address_new( $html, $field, $form, $fields, $entry_id, $hydrated_field ) { | |
| // Replace 5 with your form id and 3 with your ACF address field id | |
| if ( $form['id'] != 6 && $field['id'] != 3 ) { | |
| return $html; | |
| } | |
| // Replace 1 with the field id of the field you have used for Field Value Object | |
| $post_id = rgpost( 'input_1' ); |