Remove surrounding div

add_filter( ‘frm_no_entries_message’, ‘remove_no_entries_message_div’, 10, 2); function remove_no_entries_message_div( $message, $args ) { if ( $args[‘display’]->ID == 1066 ) { $message = str_replace( ‘<div class=”frm_no_entries”>’, ”, $message ); $message = substr( $message, 0, -6 ); } return $message; }Continue reading

Move legend

add_filter(‘frm_google_chart’, ‘frm_move_graph_legend’, 10, 2); function frm_move_graph_legend($options, $args){ $options[‘legend’] = array(‘position’ => ‘top’, ‘textStyle’ => array(‘fontSize’ => 10 ) ); $options[‘legend’][‘maxLines’] = 4; return $options; }Continue reading

Selectively strip HTML

add_filter(‘frmpro_fields_replace_shortcodes’, ‘frm_filter_some_html’, 10, 4); function frm_filter_some_html($replace_with, $tag, $atts, $field){ if ( isset($atts[‘leave_html’]) ) { $tags = explode(‘,’, $atts[‘leave_html’]); $allowed_tags = array(); foreach ( $tags as $tag ) { $allowed_tags[$tag] = array(); } $replace_with = wp_kses($replace_with, $allowed_tags); } return $replace_with; }Continue reading

Greater than and less than

add_filter(‘frmpro_fields_replace_shortcodes’, ‘frm_greater_than_less_than’, 10, 4); function frm_greater_than_less_than($replace_with, $tag, $atts, $field){ if ( isset ( $atts[‘greater_than’] ) && isset( $atts[‘less_than’] ) ) { if ( $replace_with > $atts[‘greater_than’] && $replace_with < $atts[‘less_than’] ) { // do nothing if there’s a match }…Continue reading

Check if value is not equal to several values

add_filter(‘frmpro_fields_replace_shortcodes’, ‘frm_not_equal_to_multiple_values’, 10, 4); function frm_not_equal_to_multiple_values( $replace_with, $tag, $atts, $field ) { if ( isset ( $atts[‘not_equal_multiple’] ) ) { $check_values = explode( ‘,’, $atts[‘not_equal_multiple’] ); foreach ( $check_values as $check_value ) { if ( $replace_with == $check_value ) {…Continue reading

Create a weekly recurring event

add_filter(‘frm_show_entry_dates’, ‘weekly_recurring_event’, 10, 2); function weekly_recurring_event($dates, $entry){ if ( $entry->form_id == 5 ){ //change 5 to the ID of your form if ( isset($entry->metas[125]) && $entry->metas[125] == ‘Yes’ ) {//Change 125 to the ID of your “Recurs weekly” field $start_date…Continue reading

Use typed signature

add_filter(‘frm_graph_value’, ‘my_custom_graph_value’, 10, 2); function my_custom_graph_value( $value, $field ) { if ( is_object( $field ) && $field->type == ‘signature’ ) { if ( is_array( $value ) ) { if ( ( ! isset( $value[‘output’] ) || empty( $value[‘output’] ) )…Continue reading

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