Gravity Wiz

Magically enhanced tutorials, snippets and plugins for Gravity Forms!

  • Gravity Perks
    • Gravity Perks
    • Tutorials & Snippets
    • About
  • Support
    • Documentation
    • Support
    • Account

gppa_get_input_values

  1. Description
  2. Usage
  3. Parameters
  4. Examples
  5. Since

Description

Filter the value of dynamically populated inputs and fields.

Usage

Apply to all forms.

add_filter( 'gppa_get_input_values', 'my_custom_function' );

Apply to a specific form.

add_filter( 'gppa_get_input_values_FORMID', 'my_custom_function' );

Apply to a specific field on a specific form.

add_filter( 'gppa_get_input_values_FORMID_FIELDID', 'my_custom_function' );

Parameters

  • $value string

    Value of field.

  • $field GF_Field

    Current field.

  • $template string

    Parsed template value.

  • $objects array or object

    The objects that the query is pulling from.

Examples

  1. Include all query results in value as comma-delimited list

    This example shows how you can use all returned objects from the query and put them into a comma-delimited list.

    add_filter( 'gppa_get_input_values_FORMID_FIELDID', function ( $value, $field, $template, $objects ) {
    	$processed_values = array();
    
    	foreach ( $objects as $object ) {
    		$processed_values[] = gp_populate_anything()->process_template( $field, $template, $object, 'values', $objects );
    	}
    
    	return implode( ',', $processed_values );
    }, 10, 4 );

Since

This filter is available since GF Populate Anything 1.0-beta-4.16.

All Perks

  • GF Auto Login
  • GF Better User Activation
  • GF Blacklist
  • GF Conditional Logic Dates
  • GF Conditional Pricing
  • GF Copy Cat
  • GF Date Time Calculator
  • GF Disable Entry Creation
  • GF Easy Passthrough
  • GF eCommerce Fields
  • GF Email Users
  • GF Expand Textareas
  • GF File Upload Pro
  • GF Limit Checkboxes
  • GF Limit Choices
  • GF Limit Dates
  • GF Limit Submissions
  • GF Live Preview
  • GF Media Library
  • GF Multi-Page Navigation
  • GF Nested Forms
  • GF Pay Per Word
  • GF PayPal One-time Fee
  • GF Placeholder
  • GF Populate Anything
  • GF Post Content Merge Tags
  • GF Preview Submission
  • GF Price Range
  • GF Read Only
  • GF Reload Form
  • GF Terms Of Service
  • GF Unique ID
  • GF Word Count

Copyright © 2021 · Powered by WordPress · Gravity Wiz LLC

  • Support
  • Affiliates
  • About
  • Sitemap
  • Gravity Perks
    ▼
    • Gravity Perks
    • Tutorials & Snippets
    • About
  • Support
    ▼
    • Documentation
    • Support
    • Account