Plugin Directory

Gravity Forms Directory

Add directory capabilities and other functionality to the great Gravity Forms plugin.

How do I turn off lightbox grouping?

Add the following to your theme's functions.php file:

add_filter('kws_gf_directory_lightbox_settings_rel', 'turn_off_directory_lightbox_grouping');

function turn_off_directory_lightbox_grouping() {
    return 'nofollow';
}

How do I hide entries from logged-out users?

Turn on the limituser setting, then add the following to your theme's functions.php file:

add_filter('kws_gf_treat_not_logged_in_as_user', '__return_false');

How do I sort by a column?

The sort attribute allows you to sort by an ID. To find the field ID, On the Gravity Forms “Edit Forms” page, hover over the form and click the link called "IDs" that appears.

If you want to sort by last name, you find the last name id (1.6 for example). Then, you add sort="1.6" to your [directory] shortcode.

Your shortcode could then look something like [directory form="1" sort="1.6"]

I want the URL to be different than `/entry/` - can I do that?

You can! Add the following to your theme's functions.php file:

add_filter('kws_gf_directory_endpoint', 'different_directory_endpoint');

function different_directory_endpoint($endpoint) {
        return 'example'; // Use your preferred text here. Note: punctuation may screw things up.
}

How do I add a date filter?

To add a filter by date, you add either a start_date or end_date parameter--or both--in YYYY-MM-DD format. Here's an example:

[directory form="14" start_date="1984-10-22" end_date="2011-09-07"]

How do I find a field ID?

On the Gravity Forms "Edit Forms" page, hover over the form and click the link called "IDs" that appears.

What's the license?

This plugin is released under a GPL license.

Form submissions are showing as duplicates.

This is a known issue. If the submission page has both a form in the content and the same form on the sidebar widget, the entry will be submitted twice. We're working on a fix.

How do I remove referrer information from emails?

Add the following to your theme's functions.php file:

remove_filter('gform_pre_submission_filter','gf_yst_store_referrer');

How do I use the filters?

If you want to modify the output of the plugin, you can do so by adding code to your active theme's functions.php file. For more information, check out the add_filter() WordPress Codex page

Plugin filters

  • kws_gf_directory_output, kws_gf_directory_output_'.$form_id - Modify output for all directories or just a single directory, by ID
  • kws_gf_directory_detail, kws_gf_directory_detail_'.$lead_id - Modify output for single entries
  • kws_gf_directory_value, kws_gf_directory_value_'.$input_type, kws_gf_directory_value_'.$field_id - Modify output for fields in general, or based on type (text, date, textarea, etc...), or based on field id.
  • kws_gf_directory_th, kws_gf_directory_th_'.$field_id, kws_gf_directory_th_'.sanitize_title($label) - Modify the <th> names en masse, by field ID, or by field name (lowercase like a slug)
  • kws_gf_directory_lead_image, kws_gf_directory_lead_image_icon, kws_gf_directory_lead_image_image, kws_gf_directory_lead_image_'.$lead_id
  • And many more - search for apply_filters and do_action in the gravity-forms-addons.php file
// This replaces "John" in a first name field with "Jack"
add_filter('kws_gf_directory_value_text', 'john_to_jack');
function john_to_jack($content) {
    return str_replace('John', 'Jack', $content);
}

// This replaces the "Email" table column header with "asdsad"
add_filter('kws_gf_directory_th', 'email_to_asdsad');
function email_to_asdsad($content) {
    return str_replace('Email', 'asdsad', $content);
}

// This replaces "Displaying 1-20" with "asdsad 1 - 20"
add_filter('kws_gf_directory_output', 'displaying_to_asdasd'); 
function displaying_to_asdasd($content) {
    return str_replace('Displaying', 'asdsad', $content);
}

// This replaces images with the Google icon.
// You can modify all sorts of things using the $img array in this filter.
add_filter('kws_gf_directory_lead_image', 'kws_gf_directory_lead_image_edit');
function kws_gf_directory_lead_image_edit($img = array()) {
    // $img = array('src' => $src, 'size' => $size, 'title' => $title, 'caption' => $caption, 'description' => $description, 'url' => $url, 'code' => "");
        $img['code'] = '';
    return $img;
}

I can't see the fields in the Add Fields box!

The code is meant to expand all the field boxes so you don't need to click them open and closed all the time. This works normally in Safari and Chrome (read: good browsers :-P). For some other browsers, it breaks the whole page.

To fix this issue, add this to your theme's functions.php file:

add_filter('kws_gf_display_all_fields', create_function('$content', 'return "";') );

Requires: 2.8 or higher
Compatible up to: 3.3.2
Last Updated: 2012-4-10
Downloads: 31,319

Average Rating

4 stars
(27 ratings)

Support

1 of 4 support threads in the last three weeks have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
1 person says it's broken.

100,2,2 100,2,2 100,1,1 100,1,1
100,1,1
100,1,1
0,1,0 33,3,1 100,1,1 100,2,2 100,1,1 50,2,1 50,2,1
100,1,1
100,1,1 100,1,1 100,1,1 100,1,1 100,1,1
100,1,1 100,2,2 100,3,3
100,1,1 100,1,1
100,1,1 100,1,1 100,1,1
100,2,2
100,2,2 33,3,1 100,2,2 100,1,1 67,3,2 100,1,1 100,2,2
75,4,3
0,1,0