Show only percentages

add_filter( ‘frm_graph_data’, ‘frm_percentage_graph’, 10, 2 ); function frm_percentage_graph( $data, $atts ) { if ( isset( $atts[‘title’] ) && $atts[‘title’] == ‘Gas by Percentage’ ) { $data[0][1] = “Percentage of gas used”; $total = FrmProStatisticsController::stats_shortcode( array( ‘id’ => 4124, ‘type’ =>…Continue reading

Hide fields from certain users when editing entries

add_filter(‘frm_field_type’, ‘change_my_field_type’, 10, 2); function change_my_field_type($type, $field){ if(in_array($field->id, array(15981, 15980))){ //change 15981 and 15980 to the ids of the fields to hide $user = wp_get_current_user(); $uid = $user->ID; $people = array(34, 72, 82); //Change 34,72,82 to the ID of the…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

Compare a single entry to the average

add_filter(‘frm_graph_data’, ‘frm_compare_average_graph’, 10, 2); function frm_compare_average_graph( $data, $atts ) { if ( ! isset( $atts[‘title’] ) || $atts[‘title’] !== ‘Score comparison’ ) { // Change ‘Score comparison’ to the title of your graph. return $data; } $data[0][1] = ‘Your score’;…Continue reading

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