I hereby claim:
- I am spivurno on github.
- I am spivurno (https://keybase.io/spivurno) on keybase.
- I have a public key whose fingerprint is 8079 11CF 8F94 E737 36C9 BA47 1D52 E881 0BCF 5400
To claim this, I am signing this object:
| <?php | |
| /** | |
| * On the front-end, GF Calculations will include other calculation fields in the calculation formula, even if that | |
| * calculation field comes after the field being currently calculated. On the back-end, calculation fields in formulas | |
| * for other calculation fields that preceed them, are not contributed towards that calculated total. | |
| * | |
| * This means if you are using the {subtotal} merge tag (http://gravitywiz.com/subtotal-merge-tag-for-calculations/) to | |
| * show the Subtotal and then using the {subtotal} merge tag in a field after that subtotal field to add tax, you would | |
| * need to modify the Subtotal field to subtract the tax field amount. | |
| * |
| /** | |
| * Get the selected survey choice based on entry value. | |
| */ | |
| function gw_survey_get_selected_choice( $entry, $field_id ) { | |
| $form = GFAPI::get_form( $entry['form_id'] ); | |
| $key = rgar( $entry, $field_id ); | |
| foreach( $form['fields'] as $field ) { |
| <?php | |
| add_filter( 'gform_merge_tag_filter', 'gw_add_spaces_for_multi_select_merge_tag', 10, 5 ); | |
| function gw_add_spaces_for_multi_select_merge_tag( $value, $merge_tag, $options, $field, $raw_value ) { | |
| if( GFFormsModel::get_input_type( $field ) == 'multiselect' && $merge_tag == $field['id'] ) { | |
| $value = implode( ', ', explode( ',', $value ) ); | |
| } | |
| return $value; |
| <?php | |
| # Apply to all forms | |
| add_filter( 'gwlc_approved_payments_only', '__return_true' ); | |
| # Apply to specific form (i.e. form ID #1) | |
| add_filter( 'gwlc_approved_payments_only_1', '__return_true' ); |
| /** | |
| * Gravity Perks // GP Limit Choices // Hide Form if Choices Exhausted | |
| * http://gravitywiz.com/documentation/gp-limit-choices/ | |
| * | |
| * Hide the form and display a message when the limit has been reached for a Limit-enabled field. This example will hide the form | |
| * if *any* choice is exhausted so it is best used if there is only one field with limits enabled. | |
| */ | |
| add_filter( 'gform_pre_render', 'gw_disable_form_if_choices_exhausted', 12 ); | |
| function gw_disable_form_if_choices_exhausted( $form ) { |
I hereby claim:
To claim this, I am signing this object:
| /** | |
| * Gravity Perks // GP Terms of Service Field // Add Support for Using Shortcodes in Terms Field | |
| * http://gravitywiz.com/documentation/gp-terms-of-service/ | |
| * | |
| * This plug-in-play snippet adds support for shortcodes in terms. It will automatically convert the ToS fields for the given | |
| * form into the HTML-enabled version (default uses <textarea> which does not support HTML). | |
| * | |
| * One way this snippet can be used is in conjuction with the [Post Content Shortcodes](https://wordpress.org/plugins/post-content-shortcodes/) | |
| * which provides a shortcode to retrive the content of a post. You can keep your terms in a single post and then use a | |
| * shortcode (i.e. [post-content id="12"])to display those terms in all of your ToS fields. |
| <!-- New Id --> | |
| <input name="input_2.1" type="checkbox" value="First Choice" id="choice_294_2_1" tabindex="4"> | |
| <!-- Old Id --> | |
| <input name="input_2.1" type="checkbox" value="First Choice" id="choice_2_1" tabindex="4"> |
| <?php | |
| /** | |
| * Ounce of Talent // Gravity Forms // Bump Quantity Up Depending on Whether a Field is Checked | |
| * | |
| * A brief description about this snippet and the functionality it provides. Might also include basic usage instructions if applicable. | |
| * | |
| * @version 1.0 | |
| * @author David Smith <david@gravitywiz.com> | |
| * @license GPL-2.0+ | |
| * @link http://gravitywiz.com/... |
| <?php | |
| /** | |
| * Gravity Perks // GP Price Range // Modify Validation Messages | |
| */ | |
| add_filter( 'gform_validation', function( $result ) { | |
| foreach( $result['form']['fields'] as &$field ) { | |
| if( ! $field['failed_validation'] ) { | |
| continue; |