benjamingaier
Forum Replies Created
Viewing 3 replies - 1 through 3 (of 3 total)
-
You can now activate this functionality in the settings of the plugin under:
Display entries only the the creator of the entry (users will not see other people’s entries).Got the same problem here
I had this problem myself. Just found the solution. Unfortunately I couldn’t find a hook that could filter the entries so I had to insert is in the gravity-forms-addons.php:
// // Or start to generate the directory // // Hack: added filter kws_gf_directory_lead_filter $leads = apply_filters('kws_gf_directory_lead_filter', GFDirectory::get_leads($form_id, $sort_field, $sort_direction, $search_query, $first_item_index, $page_size, $star, $read, $is_numeric, $start_date, $end_date, 'active', $approvedcolumn));I added the filter around GFDirectory::get_leads
at about line number 1040then I added this code to my functions
//Show entries of user logged in only add_filter('kws_gf_directory_lead_filter','show_user_entries'); function current_user($content) { $current_user = wp_get_current_user(); return ( $current_user->ID == $content["created_by"]) ; } function show_user_entries($leads) { return array_filter($leads, 'current_user'); }I’m still very new to writing php. If someone knows a better solution..
Hope it helps
Viewing 3 replies - 1 through 3 (of 3 total)