Enable file protection by default

add_filter( ‘frm_new_form_values’, ‘enable_file_protection_by_default’ ); function enable_file_protection_by_default( $values) { $values[‘options’][‘protect_files’] = 1; return $values; }Continue reading

Change the responsive breakpoint

add_filter(‘frm_surveys_likert_responsive_breakpoint’, ‘change_likert_responsive_breakpoint’, 10, 2); function change_likert_responsive_breakpoint( $min_width, $args ) { $field_id = is_object( $args[‘field’] ) ? $args[‘field’]->id : $args[‘field’][‘id’]; if ( 728 == $field_id ) { // Change 728 to the Likert field ID. Remove this check if you want…Continue reading

Basic example

add_action(‘frm_after_destroy_entry’, ‘my_custom_function’, 10, 2); function my_custom_function( $entry_id, $entry ) { $target_form_id = 29; // change 29 to your form ID. if ( $target_form_id !== (int) $entry->form_id ) { return; } // Handle deleted entry for target form. }Continue reading

Add extra content to PDF file

add_filter( ‘frm_pdfs_export_content’, ‘add_extra_content’, 10, 2); function add_extra_content( $content, $args ) { $entry_id = ‘<p>Entry ID: #’ . $args[‘entry’]->id . ‘</p>’; return $entry_id . $content; }Continue reading

Prepend site name to filename

add_filter(‘frm_pdfs_export_file_name’, ‘prepend_site_name’ , 10, 2); function prepend_site_name( $file_name, $args ) { $file_name = sanitize_title( get_bloginfo( ‘name’ ) ) . ‘-‘ . $file_name; return $file_name; }Continue reading

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