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_field_content', function( $content, $field, $value, $lead_form_id ) { | |
| if ( ! rgget( 'edit' ) || ! rgget( 'gvid' ) ) { | |
| return $content; | |
| } | |
| libxml_use_internal_errors( true ); | |
| $doc = new DOMDocument(); | |
| $doc->loadHTML( '<?xml encoding="utf-8" ?>' . $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 | |
| class GW_Force_Default_Value { | |
| private $_args = array(); | |
| public function __construct( $args = array() ) { | |
| // set our default arguments, parse against the provided arguments, and store for use throughout the class | |
| $this->_args = wp_parse_args( $args, array( |
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
| window.gform.addFilter( | |
| 'gpadvs_settings', | |
| function(settings, gpadvsInstance, selectNamespace) { | |
| if (gpadvsInstance.fieldType === 'multiselect') { | |
| settings.plugins.drag_drop = { | |
| title: 'Drag n Drop', | |
| }; | |
| } |
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 // Remove or Validate Emojis ✮ | |
| * | |
| * Automatically remove or provide a validation error when emojis are submitted via a Gravity Form field. | |
| * | |
| * @version 1.1 | |
| * @author David Smith <[email protected]> | |
| * @license GPL-2.0+ | |
| * @link http://gravitywiz.com/... |
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
| jQuery(document).ready(function($) { | |
| const PHONE_FIELD_ID = 2; // Phone Field ID | |
| const $phoneInput = $(`#input_${GFFORMID}_${PHONE_FIELD_ID}_raw`); | |
| const $countrySelector = $('.iti__selected-country-primary'); | |
| if (!$phoneInput.length || !$countrySelector.length) { | |
| return; | |
| } |
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( 'init', function() { | |
| $form_id = 401; // Replace with your Form ID. | |
| $field_id = 1; // Replace with your Address Field ID. | |
| $api_key = 'YOUR_GOOGLE_API_KEY'; // Replace with your Google Maps API Key. | |
| if ( ! class_exists( 'GFAPI' ) ) { | |
| return; |
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
| // Customize field IDs and offset | |
| const fieldIds = [1, 2, 3, 4]; // Text fields | |
| const targetFieldId = 5; // Number field to hold total count. | |
| const offset = -1000; // Offset value (Can be positive or negative) | |
| const getInputSelector = (id) => `#input_${GFFORMID}_${id}`; | |
| const targetSelector = getInputSelector(targetFieldId); | |
| function updateCharacterCount() { | |
| let total = 0; |
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
| /** | |
| * Gravity Connect // OpenAI // Stream to Paragraph Field (Multi-field Support) | |
| * https://gravitywiz.com/documentation/gravity-connect-openai/ | |
| * | |
| * Stream OpenAI responses from multiple Stream fields to Paragraph or Single Line Text fields. | |
| * Users can edit the final result. | |
| */ | |
| const streamFieldMappings = [ | |
| { |
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. |