• Joshua Waldman

    (@joshua-waldman)


    Is it possible for Infusionsoft to pass a user’s email address to a hidden field in Gravity forms?

    I’m trying to create a form for existing IS users to update their information using a Gravity form, and I’d rather that they not have to re-enter their email address.

    If IS can pass the user data along to GF that would be great!

    https://wordpress.org/plugins/infusionsoft/

Viewing 5 replies - 1 through 5 (of 5 total)
  • JChimene

    (@jchimene)

    You have to use the GF feature “Allow field to be populated dynamically”.
    You write a GF filter that pulls the email from the url using get_query_var().

    add_filter('gform_field_value_email', 'pf_populate_email'));

    You will need to tell WordPress to honor the custom query parameter (via a query_vars filter) so that get_query_var() will see it. See
    http://codex.wordpress.org/Function_Reference/get_query_var
    for an example.

    The code will probably be in your theme’s functions.php

    Thread Starter Joshua Waldman

    (@joshua-waldman)

    So do you put this in Advanced, default value: add_filter(‘gform_field_value_email’, ‘pf_populate_email’));

    or does it go in functions.php?

    JChimene

    (@jchimene)

    Sorry, my bad.

    The value on the form, in this example, is “email” (no quotes)

    GF then takes that value, prefixes it with “gform_field_value_” and calls the resulting function that’s defined for that filter. E.g. “gform_field_value_email” has an associated function “pf_populate_email”

    Thread Starter Joshua Waldman

    (@joshua-waldman)

    Ok.

    1. Add “email” to the hidden field default value

    2. add “add_filter(‘gform_field_value_email’, ‘pf_populate_email’));” to my functions.php

    3. add “<?php get_query_var( $var ) ?>” to my functions.php page.

    Do I need to customize any of that code?

    Am I missing anything?

    JChimene

    (@jchimene)

    A few items:

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Pass hidden user info from IS to a Gravity form?’ is closed to new replies.