Check each value from checkbox

add_filter(‘frm_filter_where_val’, ‘frm_search_multiple_values’, 8, 2); function frm_search_multiple_values($where, $args){ if ( $args[‘display’]->ID == 205 and in_array( $args[‘where_opt’], array( 82, 83, 84 ) ) ) { $where = explode(‘, ‘, $where); } return $where; }Continue reading

Set a custom filter value

add_filter(‘frm_filter_where_val’, ‘my_custom_filter_value’, 8, 2); function my_custom_filter_value( $where, $args ) { if ( $args[‘display’]->ID == 205 && $args[‘where_opt’] == 84 && isset( $_GET[‘param_name’] ) && $_GET[‘param_name’] ) { $where = $_GET[‘param_name’]; } return $where; }Continue reading

Remove characters from filter value

add_filter(‘frm_filter_where_val’, ‘remove_characters_from_filter_value’, 8, 2); function remove_characters_from_filter_value( $where_value, $args ) { if ( $args[‘display’]->ID == 205 && $args[‘where_opt’] == 84 ) { $where_value = str_replace( array( ‘amp;’ ), ”, $where_value ); } return $where_value; }Continue reading

Search linked field for numeric values

add_filter(‘frm_search_for_dynamic_text’, ‘search_numeric_values_in_dynamic_field’, 10, 3); function search_numeric_values_in_dynamic_field( $search_linked_values, $where_field, $args ) { if ( $where_field->id == 100 ) { //change 100 to the ID of your field $search_linked_values = true; } return $search_linked_values; }Continue reading

Replace “No Data” Message

add_filter(‘frm_no_data_graph’, ‘no_data_graphs’, 10, 2); function no_data_graphs($html){ $html = ‘There are no entries for this graph. Sorry!’; //replace this text string return $html; }Continue reading

Get value from a post ID

add_filter(‘frmpro_fields_replace_shortcodes’, ‘frm_show_post_shortcode’, 10, 4); function frm_show_post_shortcode($replace_with, $tag, $atts, $field){ if(isset($atts[‘show_post’]) and is_numeric($replace_with)){ $post = get_post($replace_with); if($post){ if(isset($post->{$atts[‘show_post’]})) $replace_with = $post->{$atts[‘show_post’]}; else $replace_with = get_post_meta($post->ID, $atts[‘show_post’], true); } } return $replace_with; }Continue reading

Link to posts with Data from Entries field

add_filter(‘frmpro_fields_replace_shortcodes’, ‘frm_dfe_link_to_post’, 10, 4); function frm_dfe_link_to_post($replace_with, $tag, $atts, $field){ if ( isset($atts[‘link’]) && $atts[‘link’] == ‘true’ && isset( $atts[‘show’] ) && $atts[‘show’] == ‘id’ ){ if ( !is_array( $replace_with ) ){ $replace_with = array( $replace_with ); } $ids = array_filter(…Continue reading

Add a case-sensitive like comparison

add_filter(‘frmpro_fields_replace_shortcodes’, ‘frm_check_for_case_sensitive_like_value’, 20, 4); function frm_check_for_case_sensitive_like_value( $replace_with, $tag, $atts, $field ){ if ( isset( $atts[‘case_sensitive_like’] ) && ! empty( $replace_with ) ) { if ( is_array( $replace_with ) ) { if ( ! in_array( $atts[‘case_sensitive_like’], $replace_with ) ) { $replace_with…Continue reading

Use Base64 file info

add_filter( ‘frmpro_fields_replace_shortcodes’, ‘frm_get_file_info’, 10, 4 ); function frm_get_file_info( $replace_with, $tag, $atts, $field ) { if ( ! is_numeric( $replace_with ) ) { return $replace_with; } $use_base64 = isset( $atts[‘encoding’] ) && $atts[‘encoding’] === ‘base64’; $use_path_info = ! $use_base64 && isset(…Continue reading

Show last four characters

add_filter(‘frmpro_fields_replace_shortcodes’, ‘frm_substr_shortcode’, 10, 4); function frm_substr_shortcode($replace_with, $tag, $atts, $field){ if(isset($atts[‘substr’])){ $replace_with = substr($replace_with, $atts[‘substr’]); } return $replace_with; }Continue reading