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

Show an avatar from email

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

Insert multiple values into a shortcode

add_filter(‘frmpro_fields_replace_shortcodes’, ‘frm_make_shortcode’, 10, 4); function frm_make_shortcode($replace_with, $tag, $atts, $field){ if(isset($atts[‘shortcode’])){ $new_val = ”; foreach((array)$replace_with as $v){ if(is_numeric($v)) $new_val .= ‘[jwplayer file=”‘. wp_get_attachment_url($v) .’”]’; } return $new_val; } return $replace_with; }Continue reading

Trigger action for a specific embedded form

add_filter(‘frm_use_embedded_form_actions’, ‘frm_trigger_embedded_form_actions’, 10, 2); function frm_trigger_embedded_form_actions( $trigger_actions, $args ) { if ( $args[‘form’]->id == 123 ) { $trigger_actions = true; } return $trigger_actions; }Continue reading

Stop user ID filter for admins

add_filter(‘frm_where_filter’, ‘stop_filter_for_admin’, 10, 2); function stop_filter_for_admin( $where, $args ) { if ( $args[‘display’]->ID == 3 && $args[‘where_opt’] == 25 ) { //change 3 to the ID of your View and change 25 to the ID of your user ID field…Continue reading

Check if one of two fields contains a value

add_filter(‘frm_where_filter’, ‘custom_or_filter’, 10, 2); function custom_or_filter($where, $args){ if ( $args[‘display’]->ID == 3 && $args[‘where_opt’] == 100 ) {//Change 3 to the ID of the View. Change 100 to the ID of the field you have added as a filter and…Continue reading

Add two filters combined with OR

add_filter(‘frm_where_filter’, ‘custom_or_filter_two_values’, 10, 2); function custom_or_filter_two_values($where, $args){ $view_id = 4131;// Replace with your View ID $field_1 = 363;// Replace with ID of Field A $field_2 = 426;// Replace with the ID of Field B $search_term_1 = ‘test’;// Replace with the…Continue reading