Basic example

add_action( ‘frm_export_view_options_saved’, ‘after_export_view_options_saved’ ); function after_export_view_options_saved( $settings ) { // Do something after export view options have been saved. }Continue reading

Extend logging

add_filter(‘frm_logs_cron_remains’, ‘logs_cron_remains_extend’); function logs_cron_remains_extend() { return ‘-1 month’; }Continue reading

Add additional autocomplete options

/** * @param array $options * @param array $field */ function add_custom_autocomplete_option_for_field( $options, $field ) { $target_field_id = 13; // change 13 to your text field ID if ( $target_field_id !== (int) $field[‘id’] ) { return $options; } $options[‘cc-name’] =…Continue reading

Include only draft entries

add_filter( ‘frm_dynamic_field_include_drafts’, ‘dynamic_include_draft_entries’ ); function dynamic_include_draft_entries( $include ) { return ‘drafts_only’; // Or return FrmProDynamicFieldsController::DRAFTS_ONLY; }Continue reading

Show only percentages

add_filter( ‘frm_graph_data’, ‘frm_percentage_graph’, 10, 2 ); function frm_percentage_graph( $data, $atts ) { if ( isset( $atts[‘title’] ) && $atts[‘title’] == ‘Gas by Percentage’ ) { $data[0][1] = “Percentage of gas used”; $total = FrmProStatisticsController::stats_shortcode( array( ‘id’ => 4124, ‘type’ =>…Continue reading

Hide fields from certain users when editing entries

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