Include only draft entries for specific dynamic field

add_filter( ‘frm_dynamic_field_include_drafts’, ‘specific_dynamic_include_draft’, 10, 2 ); function specific_dynamic_include_draft( $include, $args ) { if ( 13 == $args[‘field’][‘id’] ) { // Replace 13 with the ID of the dynamic field return ‘drafts_only’; // Or return FrmProDynamicFieldsController::DRAFTS_ONLY; } return $include; }Continue reading

Change priority order

add_filter(‘frm_api_action_options’, ‘change_priority_order’) function change_priority_order( $options ) { $options[‘priority’] = 50; return $options; }Continue reading

Change ID used for graph

add_filter( ‘frm_graph_id’ , ‘change_graph_id’ ); function change_graph_id( $id ) { if ( ‘_frm_column1’ === $id ) { return ‘first_column_graph’; } return $id; }Continue reading

Hide meta for a specific user ID

add_filter( ‘frmreg_show_meta_on_profile’, ‘hide_meta_for_specific_user’, 10, 2 ); function hide_meta_for_specific_user( $show, $user_profile ) { $target_user_id = 43; // Replace 43 with the ID of the User ID field. if ( $user_profile instanceof WP_User && $target_user_id === $user_profile->ID ) { $show = false;…Continue reading

Change login limit message

add_filter(‘frm_reg_login_limit_exceeded_error_message’, ‘change_login_limit_message’); function change_login_limit_message( $message ) { if ( $message ) { $message = ‘You have been locked out for having too many failed login attempts’; } return $message; }Continue reading

Create a Leaderboard

add_filter( ‘frm_view_order’, ‘frm_order_by_sum’, 10, 2 ); function frm_order_by_sum( $query, $args ) { global $wpdb; if ( $args[‘display’]->ID != 1478 ) { // Change 1478 to the id of your View. return $query; } $total_field_id = 4235; // Change 4235 to…Continue reading

Replace product field options

add_filter( ‘frm_setup_new_fields_vars’, ‘frm_populate_posts’, 20, 2 ); add_filter( ‘frm_setup_edit_fields_vars’, ‘frm_populate_posts’, 20, 2 ); function frm_populate_posts( $values, $field ) { $target_field_id = 278; // Replace 278 with the ID of the product field. if ( (int) $field->id !== $target_field_id ) { return…Continue reading