WordPress.org

Support

Support » Plugins and Hacks » Gravity Forms Directory » [Resolved] [Plugin: Gravity Forms Directory] Accessing form data for output in single entries

[Resolved] [Plugin: Gravity Forms Directory] Accessing form data for output in single entries

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author Zack Katz

    @katzwebdesign

    To retrieve data from a lead, you would use:

    $value = get_gf_field_value($leadid, $fieldid, $form);

    This is great! Can you provide php example? Where do I get $leadid? I assume the $form is the corresponding form number? I cam attempting to output a googlemap generated dynamically from address information. I see that I can hook into the single entries output and append data via a functions.php call. I will be doing this. Thanks for the prompt response Zack.

    Zack,

    Are there any pre, post hooks for the directory and entry pages? That would really help me include additional table sorting scripts. Thank you.

    Plugin Author Zack Katz

    @katzwebdesign

    Tons. Please search the code for apply_filters and do_action.

    Yah,

    Still looking for an action that will allow me to place custom content directly after the single entry details table on the single entry page.

    Not seeing exactly how to place custom content after the single entry table. Did not see any do_action there. Can you assist with a couple simple lines of function.php code for that? Thank you very much. Happy to donate for your time.

    Plugin Author Zack Katz

    @katzwebdesign

    If it’s a lightbox entry, use the kws_gf_directory_detail filter. (in entry-details.php).

    Otherwise, use kws_gf_directory_detail (line 1188).

    Plugin Author Zack Katz

    @katzwebdesign

    For functions.php:

    add_filter('kws_gf_directory_detail', 'add_my_own_content_after_gf_detail');
    
    function add_my_own_content_after_gf_detail($detail = '') {
    	return $detail.' ...and my custom content';
    }

    As Yes! Perfect. Thank you. Seems I know enough to be dangerous.

    Last response,

    Zack how would I use this function to grab field values for my add_my_own_content… $value = get_gf_field_value($leadid, $fieldid, $form);

    $fieldid = specified;
    $leadid = how to get this?
    $value = get_gf_field_value($leadid, $fieldid, $form);

    Otherwise this has been perfect.

    Plugin Author Zack Katz

    @katzwebdesign

    When viewing a single Entry in Gravity Forms, the ID of the entry (“lead”) is the heading. It’ll say Entry #102, for example.

    Also, the URL of that page will look like this, with lid being the lead ID.
    admin.php?page=gf_entries&view=entry&id=4<strong>&lid=102</strong>&filter=&paged=1&pos=0

    Right,

    How do I access that information for use in that get_gf_field_value() function on the single entry table page. I just want to be able to use some address fields to output a googlemap. Thanks.

    Maybe I didn’t mention that it will be used dynamically on the single entry page so I will only be able to specify the fieldid and formid. I need to be able to get the leadid from the single entry page.

    I just ran into the same thing using:

    $value = get_gf_field_value($leadid, 22, 1);

    doesn’t get the $leadid value on the single entry pages. It works fine if you specify the id as a number. I want to create a link dynamically for example: domain.com/fieldvalue instead of outputting the value of the field.

    Any ideas?

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘[Resolved] [Plugin: Gravity Forms Directory] Accessing form data for output in single entries’ is closed to new replies.
Skip to toolbar