Add a mask to Credit Card

add_filter( ‘frm_input_masks’, ‘add_cc_mask’, 10, 2 ); function add_cc_mask( $masks, $forms_on_page ) { foreach ( $forms_on_page as $form ) { if ( $form->id == 10 ) { // replace 10 with your form id $masks[‘FIELDKEYHERE_cc’] = ‘9999-9999-9999-9999’; // replace FIELDKEYHERE with…Continue reading

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

Force Success Message on Update

add_filter(‘frm_success_filter’, ‘change_my_confirmation_method’, 10, 2); function change_my_confirmation_method( $type, $form ) { if ( $form->id == 5 && isset( $_POST ) && isset( $_POST[‘frm_action’] ) && $_POST[‘frm_action’] == ‘update’ ) { //change 5 to the ID of your form $type = ‘message’;…Continue reading

Basic Example

add_filter(‘frm_graph_data’, ‘my_custom_graph_data’, 10, 2); function my_custom_graph_data( $data, $atts ) { if ( isset( $atts[‘title’] ) && $atts[‘title’] == ‘My graph’ ) { $data[] = array( ‘X-axis label’, 10, 20, 30 ); } return $data; }Continue reading

Basic Example

add_filter(‘frm_send_email’, ‘frm_stop_email_with_no_entries’, 10, 2); function frm_stop_email_with_no_entries( $send, $email){ if ($email[‘message’] == ‘No Entries Found’) { $send = false; } return $send; }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