Only allow the action once

add_filter( ‘frm_skip_form_action’, ‘stop_multiple_actions’, 20, 2 ); function stop_multiple_actions( $skip_this_action, $args ) { if ( $args[‘action’]->ID == 115 && ! $skip_this_action ) { //replace 115 with your action ID $entry_id = $args[‘entry’]; if ( is_object( $args[‘entry’] ) ) { $entry_id =…Continue reading

Skip based on entry creation date

add_filter( ‘frm_skip_form_action’, ‘stop_multiple_actions’, 20, 2 ); function stop_multiple_actions( $skip_this_action, $args ) { if ( $args[‘action’]->ID == 115 && ! $skip_this_action ) { //replace 115 with your action ID if ( is_object( $args[‘entry’] ) ) { $entry = $args[‘entry’]; } else…Continue reading

Skip if the submitter is Admin

add_filter( ‘frm_skip_form_action’, ‘stop_admin_update_email’, 10, 2 ); function stop_admin_update_email( $skip_this_action, $args ) { if ( $args[‘action’]->ID == 115 ) { //replace 115 with your action ID if ( current_user_can( ‘administrator’ ) ) { $skip_this_action = true; } } return $skip_this_action; }Continue reading

Remove All Meta Columns

add_filter( ‘frm_csv_columns’, ‘remove_id_column’, 10, 2 ); function remove_id_column( $headings, $form_id ) { if ( $form_id == 5 ) { //change 5 to your Form ID unset( $headings[‘created_at’] ); unset( $headings[‘updated_at’] ); unset( $headings[‘user_id’] ); unset( $headings[‘updated_by’] ); unset( $headings[‘is_draft’] );…Continue reading

Filter by User ID in linked entry

add_filter(‘frm_csv_where’, ‘filter_by_linked_id’, 10, 2); function filter_by_linked_id( $where, $args ) { if ( $args[‘form_id’] == 1003 ) {// Change 19 to the ID of your form $user_id = get_current_user_id(); $linked_form_id = 19; $linked_id_where = array( ‘user_id’ => $user_id, ‘form_id’ => $linked_form_id…Continue reading

Change Default Time

add_filter( ‘frm_autoresponder_time’, ‘change_default_autoresponder_time’, 10, 2 ); function change_default_autoresponder_time( $time, $args ) { $time = ’10:00:00′; return $time; }Continue reading

Custom invoice number

add_filter( ‘frm_authnet_invoice_num’, ‘set_custom_auth_invoice_num’, 10, 2 ); function set_custom_auth_invoice_num( $invoice_number, $args ) { $field_id = 520; $field = FrmField::getOne( $field_id ); $entry_meta = FrmEntryMeta::get_entry_metas_for_field( $field_id ); if ( $field->form_id == ’45’ ) { $invoice_number = $entry_meta[0]; } return $invoice_number; }Continue reading

Adjust Time for Specific Form Action

add_filter( ‘frm_autoresponder_time’, ‘change_default_autoresponder_time’, 10, 2 ); function change_default_autoresponder_time( $time, $args ) { $time_field_id = 25; //replace 25 with the ID of your Time field $form_action_id = 250; //replace 250 with your form Action ID if ( $args[‘action’]->ID == $form_action_id &&…Continue reading

Break post content and View connection

add_action(‘frm_after_create_entry’, ‘frm_break_post_content_connection’, 60, 2); function frm_break_post_content_connection( $entry_id, $form_id ) { if ( $form_id == 156 ) {// Replace 156 with the ID of your form $entry = FrmEntry::getOne( $entry_id ); if ( ! $entry->post_id ) { return; } delete_post_meta( $entry->post_id,…Continue reading

Display Specific Message Based on URL Parameter

add_filter( ‘frm_no_entries_message’, ‘remove_no_entries_message’, 10, 2); function remove_no_entries_message( $message, $args ) { $host = $_SERVER[‘REQUEST_URI’]; if ( $args[‘display’]->ID == 1378 ) { if ($host == “/your-relative-url/?status=pending”) { $message = ‘You have no pending entries.’; } elseif ($host == “/your-relative-url/?status=incomplete”) { $message…Continue reading