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 Perks // GP Notification Scheduler // Credit Card Expiration | |
| * | |
| * Send notifications based on a credit card expiration date. | |
| * | |
| * @version 0.1 | |
| * @author David Smith <david@gravitywiz.com> | |
| * @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
| <?php | |
| /** | |
| * WARNING! THIS SNIPPET MAY BE OUTDATED. | |
| * The latest version of this snippet can be found in the Gravity Wiz Snippet Library: | |
| * https://github.com/gravitywiz/snippet-library/blob/master/gravity-forms/gw-user-registration-update-by-email.php | |
| */ | |
| /** | |
| * Gravity Wiz // Gravity Forms // User Registration // Update by Email | |
| * | |
| * Create User Registration feeds that will update the user by the submitted email address, allowing non-logged-in users |
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 // Display Price for Drop Down and Radio Button Product Fields | |
| * http://gravitywiz.com/ | |
| * Source: https://www.gravityhelp.com/documentation/article/gform_field_choice_markup_pre_render/#2-include-price-for-product-fields | |
| */ | |
| add_filter( 'gform_field_choice_markup_pre_render', function ( $choice_markup, $choice, $field, $value ) { | |
| if ( $field->type == 'product' ) { | |
| $new_string = sprintf( '>%s - %s<', $choice['text'], GFCommon::to_money( $choice['price'] ) ); |
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 // Populate Form with Entry (Optionally Update Entry on Submission) | |
| * | |
| * Pass an entry ID and populate the form automatically. No form configuration required. Optionally update the entry on | |
| * submission. | |
| * | |
| * @version 1.5 | |
| * @author David Smith <david@gravitywiz.com> | |
| * @license GPL-2.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
| <?php | |
| /** | |
| * Gravity Wiz // Gravity Forms // Modify Date Field Format in Entries | |
| * http://gravitywiz.com/ | |
| */ | |
| // Replace "123" with your form ID and "7" with your Date field ID. | |
| add_filter( 'gform_get_input_value_123_7', function( $value ) { | |
| // See PHP date() documentation for more details on date formatting: http://php.net/manual/en/function.date.php | |
| $date_format = 'l, m/d/Y'; // i.e. Tuesday, 01/13/1987. | |
| return date( $date_format, strtotime( $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
| <?php | |
| /** | |
| * Gravity Wiz // Gravity Forms // Redirect if Email Exists | |
| * | |
| * Redirect to a specified URL if the the submitted email address matches an existing user. | |
| * | |
| * Note: Does not work with AJAX-enabled forms. | |
| * | |
| * @version 0.1 | |
| * @author David Smith <david@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
| <?php | |
| /** | |
| * WARNING! THIS SNIPPET MAY BE OUTDATED. | |
| * The latest version of this snippet can be found in the Gravity Wiz Snippet Library: | |
| * https://github.com/gravitywiz/snippet-library/blob/master/experimental/gw-gravity-forms-to-wp-job-manager.php | |
| */ | |
| /** | |
| * Gravity Wiz // Gravity Forms // Populate GF Data into WP Job Manager Custom Fields | |
| * | |
| * Provides support for mapping a GF multiselect field to a WPJM multiselect 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
| <?php | |
| /** | |
| * Gravity Wiz // Gravity Forms // Get Uploaded Files Prior to Submission | |
| * | |
| * @param integer $form_id The form ID that contains that field for which you are fetching the uploaded file details. | |
| * @param GF_Field $field The field object for which you are fetching the uploaded file details. | |
| * | |
| * @return array|bool | |
| */ | |
| function gw_get_uploaded_file_deets( $form_id, $field ) { |