Remove risky characters

add_filter( ‘frm_export_view_risky_characters’, ‘remove_risky_characters’ ); function remove_risky_characters( $characters ) { return array( ‘=’, ‘@’ ); }Continue reading

Graph field values with stats

add_filter( ‘frm_graph_data’, ‘frm_stats_graph’, 10, 2 ); function frm_stats_graph( $data, $atts ) { if ( isset( $atts[‘title’] ) && $atts[‘title’] == ‘gas’ ) { $data[0][1] = “Gas (in gallons)”; for ( $i = 1, $l = count( $data ); $l >…Continue reading

Create an entry for each user

add_action(‘frm_after_create_entry’, ‘frm_create_entry_for_each_user’, 30, 2); function frm_create_entry_for_each_user( $entry_id, $form_id ) { global $wpdb; if ( $form_id != 527 ) { //Change 527 to the id of the Trigger form return; } $directory_form = ‘526’; // Change 526 to the id of…Continue reading

Remove a field from PDF file

add_filter( ‘frm_pdfs_fields_for_export’, ‘remove_field_from_pdf’, 10, 2); function remove_field_from_pdf( $fields, $args ) { if ( 10 == $args[‘entry’]->id ) { // Replace 10 with your entry ID foreach ( $fields as $index => $field ) { if ( 13 == $field->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