Use a custom URL

add_filter( ‘frm_jquery_ui_base_url’, ‘change_google_url’ ); function change_google_url( $url ) { return ‘http://example.com/’; }Continue reading

Basic Example

add_filter(‘frm_graph_value’, ‘my_custom_graph_value’, 10, 2); function my_custom_graph_value( $value, $field ) { if ( $field->id == 123 ) { $value = ‘new value’; } return $value; }Continue reading

Show substring of an entry

add_filter( ‘frmpro_fields_replace_shortcodes’, ‘frm_substr_shortcode’, 10, 4 ); function frm_substr_shortcode( $replace_with, $tag, $atts, $field ) { if ( isset( $atts[‘length’] ) ) { $start = isset( $atts[‘start’] ) ? $atts[‘start’] : 0; $replace_with = substr( $replace_with, $start, $atts[‘length’] ); } elseif (…Continue reading

Add a page anchor

add_filter( ‘frm_prev_page_link’, ‘change_pagination_link’, 10, 2 ); add_filter( ‘frm_first_page_link’, ‘change_pagination_link’, 10, 2 ); add_filter( ‘frm_page_link’, ‘change_pagination_link’, 10, 2 ); add_filter( ‘frm_last_page_link’, ‘change_pagination_link’, 10, 2 ); add_filter( ‘frm_next_page_link’, ‘change_pagination_link’, 10, 2 ); function change_pagination_link( $link, $atts ) { if ( $atts[‘view’]->ID ===…Continue reading

Change the page parameter

add_filter( ‘frm_prev_page_link’, ‘change_pagination_link’, 10, 2 ); add_filter( ‘frm_first_page_link’, ‘change_pagination_link’, 10, 2 ); add_filter( ‘frm_page_link’, ‘change_pagination_link’, 10, 2 ); add_filter( ‘frm_last_page_link’, ‘change_pagination_link’, 10, 2 ); add_filter( ‘frm_next_page_link’, ‘change_pagination_link’, 10, 2 ); function change_pagination_link( $link, $atts ) { if ( $atts[‘view’]->ID ===…Continue reading

Change View order based on URL parameter

add_filter( ‘frm_filter_view’, ‘change_my_view_object’, 10, 1); function change_my_view_object( $view ) { if ( $view->ID === 123 ) { if ( isset( $_GET[‘my_param’] ) && $_GET[‘my_param’] == ‘custom_value’ ) { $view->frm_order_by = array( 150 ); $view->frm_order = array( ‘DESC’ ); } }…Continue reading

Send separate emails for a specific action

add_filter(‘frm_send_separate_emails’, ‘frm_send_separate_emails’, 10, 2); function frm_send_separate_emails( $is_separate, $args ) { if ( in_array( $args[‘action’]->ID, array( 4933, 4924 ) ) ) { $is_separate = true; } return $is_separate; }Continue reading

Don’t validate reCaptcha during API request

add_filter( ‘frm_is_field_hidden’, ‘mark_recaptcha_hidden’, 20, 2 ); function mark_recaptcha_hidden( $hidden, $field ) { $is_api_request = defined( ‘REST_REQUEST’ ) && REST_REQUEST; if ( FrmField::is_field_type( $field, ‘captcha’ ) && $is_api_request ) { $hidden = true; } return $hidden; }Continue reading