Add directory capabilities and other functionality to the great Gravity Forms plugin.
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';
}
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');
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"]
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.
}
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"]
On the Gravity Forms "Edit Forms" page, hover over the form and click the link called "IDs" that appears.
This plugin is released under a GPL license.
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.
Add the following to your theme's functions.php file:
remove_filter('gform_pre_submission_filter','gf_yst_store_referrer');
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
kws_gf_directory_output, kws_gf_directory_output_'.$form_id - Modify output for all directories or just a single directory, by IDkws_gf_directory_detail, kws_gf_directory_detail_'.$lead_id - Modify output for single entrieskws_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_idapply_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;
}
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
1 of 4 support threads in the last three weeks have been resolved.
Got something to say? Need help?