Support » Plugin: Gravity Forms Directory » Bulk Approve Missing

  • WordPress version: 4.6.1
    Gravity Forms Directory version: 3.8.1

    I did this: Just updated WordPress and plugins and I lost the ability to bulk approve or disapprove entries. I noticed in the changelog you have “Removed bulk update Approve and Disapprove options when form not approval-enabled”. Is the a form setting? I’m not sure if I need to check a box or what to get the bulk approval back.

    I turned off all plugins except gf and this one and the issue persisted.

    I expected the plugin to do this:
    Allow me to bulk approve entries

    Instead it did this:
    Doesn’t give the option in the drop down on the entries list page

    Here’s a link to see what I mean:
    N/A, it’s in the admin.

    • This topic was modified 2 years, 2 months ago by  rwhetsto.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Update: In edit-form.php, line 217
    Add the id selector #bulk-action-selector-top, ie…
    $(“#bulk_action,#bulk_action2,#bulk-action-selector-top”).append(‘<optgroup label=”Directory”><option value=”approve-‘+formID+'”><?php echo esc_js( __(‘Approve’, ‘gravity-forms-addons’)); ?></option><option value=”unapprove-‘+formID+'”><?php echo esc_js( __(‘Disapprove’, ‘gravity-forms-addons’)); ?></option></optgroup>’);

    This gets it to show up in the drop down, but it doesn’t work yet. Still investigating. Let me know if I’m on the wrong track.

    Update2: In admin.php, line 45, few updates needed as follows, commented out most of the original code to show changes. It works for me now. Hopefully this helps someone else and the creator!

    public static function process_bulk_update() {
    		global $process_bulk_update_message;
    		//if ( RGForms::post( "action" ) === 'bulk' ) {
    		if ( RGForms::post( "action" ) === 'unapprove-2' || RGForms::post( "action" ) === 'approve-2' ) {
    			check_admin_referer( 'gforms_entry_list', 'gforms_entry_list' );
    			//$bulk_action = ! empty( $_POST["bulk_action"] ) ? $_POST["bulk_action"] : $_POST["bulk_action2"];
    			$leads       = $_POST["entry"];
    			$entry_count = count( $leads ) > 1 ? sprintf( __( "%d entries", "gravityforms" ), count( $leads ) ) : __( "1 entry", "gravityforms" );
    			//$bulk_action = explode( '-', $bulk_action );
    			//if ( ! isset( $bulk_action[1] ) || empty( $leads ) ) {
    			//	return false;
    			$bulk_action = RGForms::post( "action" );
    			switch ( $bulk_action ) {
    				case "approve-2":
    					self::directory_update_bulk( $leads, 1, $bulk_action[1] );
    					$process_bulk_update_message = sprintf( __( "%s approved.", "gravity-forms-addons" ), $entry_count );
    				case "unapprove-2":
    					self::directory_update_bulk( $leads, 0, $bulk_action[1] );
    					$process_bulk_update_message = sprintf( __( "%s disapproved.", "gravity-forms-addons" ), $entry_count );
    • This reply was modified 2 years, 2 months ago by  rwhetsto.

    Oh, crap, I now understand the -2’s (approve-2, unapprove-2)…. those have to do with what form you are on. Keep this in mind, I guess you should do a strpos or something similar to look for approve or unapprove.


    Did you find the solution to this? I’m unable to approve entries at all because the edit entry view doesn’t work either.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Bulk Approve Missing’ is closed to new replies.