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
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
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
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 “Add Media” button to TinyMCE editor add_filter(‘frm_rte_options’, ‘frm_rte_options’, 10, 2); function frm_rte_options($opts, $field){ if ( current_user_can(‘manage_options’ ) ) { $opts[‘media_buttons’] = true; } return $opts; }Continue reading
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
add_filter(‘frm_pre_create_entry’, ‘frm_upload_from_url’); function frm_upload_from_url( $values ) { if ( $values[‘form_id’] == 5 ) { //change 5 to your form id $upload_field_id = 25; // replace 25 with the id of your upload field $url_field = 24; // replace 24 with…Continue reading
add_filter( ‘frm_load_dropzone’, ‘stop_dropzone’ ); function stop_dropzone( $load_it ) { if ( is_page(25) ) { // set the page or other conditions here $load_it = false; } return $load_it; }Continue reading
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
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
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
add_action(‘frm_after_create_entry’, ‘create_entry_after_submission’, 30, 2); function create_entry_after_submission($entry_id, $form_id){ if ( $form_id != 372 ) {//Change 372 to the ID of Form A return; } $form2 = ‘373‘;//Change 373 to the ID of Form B //Get user if (!isset($_POST[‘frm_user_id’])){ return; } $user…Continue reading