Enable saving drafts by default
add_filter( ‘frm_new_form_values’, ‘saving_drafts_by_default’ ); function saving_drafts_by_default( $values) { $values[‘options’][‘save_draft’] = 1; return $values; }Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_filter( ‘frm_new_form_values’, ‘saving_drafts_by_default’ ); function saving_drafts_by_default( $values) { $values[‘options’][‘save_draft’] = 1; return $values; }Continue reading
add_filter(‘frm_field_type’, ‘change_my_field_type’, 10, 2); function change_my_field_type($type, $field){ if(in_array($field->id, array(15981, 15980))){ //change 15981 and 15980 to the ids of the fields to hide $user = wp_get_current_user(); $uid = $user->ID; $people = array(34, 72, 82); //Change 34,72,82 to the ID of the…Continue reading
add_filter( ‘frm_export_content’, function( $cell ) { if ( ‘+’ === substr( $cell, 0, 1 ) && ! cell_is_phone_number( $cell ) ) { return “‘” . $cell; } return $cell; } ); function cell_is_phone_number( $cell ) { $substring = substr( $cell,…Continue reading
add_filter( ‘frm_dynamic_field_include_drafts’, ‘specific_dynamic_include_draft’, 10, 2 ); function specific_dynamic_include_draft( $include, $args ) { if ( 13 == $args[‘field’][‘id’] ) { // Replace 13 with the ID of the dynamic field return ‘drafts_only’; // Or return FrmProDynamicFieldsController::DRAFTS_ONLY; } return $include; }Continue reading
add_filter(‘frm_api_action_options’, ‘change_priority_order’) function change_priority_order( $options ) { $options[‘priority’] = 50; return $options; }Continue reading
add_filter( ‘frm_export_csv_line_break’, ‘change_csv_line_break’); function change_csv_line_break( $line_break ) { return ‘|’; }Continue reading
add_filter( ‘frm_graph_id’ , ‘change_graph_id’ ); function change_graph_id( $id ) { if ( ‘_frm_column1’ === $id ) { return ‘first_column_graph’; } return $id; }Continue reading
add_filter(‘frm_graph_data’, ‘frm_compare_average_graph’, 10, 2); function frm_compare_average_graph( $data, $atts ) { if ( ! isset( $atts[‘title’] ) || $atts[‘title’] !== ‘Score comparison’ ) { // Change ‘Score comparison’ to the title of your graph. return $data; } $data[0][1] = ‘Your score’;…Continue reading
add_filter( ‘frm_export_view_risky_characters’, ‘remove_risky_characters’ ); function remove_risky_characters( $characters ) { return array( ‘=’, ‘@’ ); }Continue reading
add_filter( ‘frm_graph_data’, ‘frm_stats_graph’, 10, 2 ); function frm_stats_graph( $data, $atts ) { if ( isset( $atts[‘title’] ) && $atts[‘title’] == ‘gas’ ) { $data[0][1] = “Gas (in gallons)”; for ( $i = 1, $l = count( $data ); $l >…Continue reading