Preserve entry list columns when form is duplicated

This feature is now available within the Gravity Hopper plugin.

If you regularly duplicate forms and would like that the entry list table preserve selected columns, the following will improve your workflow.

// Duplicate selected entry columns when form is duplicated
add_action( 'gform_post_form_duplicated', function( $form_id, $new_id ) {

    $columns = GFFormsModel::get_grid_column_meta( $form_id );
    GFFormsModel::update_grid_column_meta( $new_id, $columns );

}, 10, 2 );Code language: PHP (php)

How do you find this article?