Change failed message for specific form

add_filter(‘frm_global_failed_msg’, ‘change_global_failed_msg_form’, 10, 2); function change_global_failed_msg_form( $message, $settings ) { $target_form_id = 852; // change 852 with the ID of your form if ( $target_form_id === (int) $settings->current_form ) { $message = ‘Custom failed message for target form ID’; }…Continue reading

Change CSV log filename

add_filter(‘frm_logs_csv_filename’, ‘change_logs_csv_filename’, 10, 2); function change_logs_csv_filename($filename){ $filename = date(“ymdHis”,time()) . ‘_formidable_logs.csv’;//Change the filename here return $filename; }Continue reading

Check nonce on form submission

add_filter( ‘frm_validate_entry’, ‘check_nonce_on_submit’, 10, 2 ); function check_nonce_on_submit( $errors, $values ) { $target_form_id = 117; // Replace 117 with the ID of your form. if ( $target_form_id === $values[‘form_id’] && ! wp_verify_nonce( $values[ ‘frm_submit_entry_’ . $values[‘form_id’] ], ‘frm_submit_entry_nonce’ ) )…Continue reading

Rename Name fields on export

add_filter( ‘frm_csv_columns’, ‘change_column_name’, 10, 2 ); function change_column_name( $headings, $form_id ) { $name_field_id = 2248; //Replace 1152 with your Name field ID $headings[ $name_field_id . ‘_first’ ] = ‘First name column’; $headings[ $name_field_id . ‘_last’ ] = ‘Last name column’;…Continue reading

Allow ampersands in redirect URL

add_filter( ‘frm_redirect_url’, ‘replace_encoded_ampersand’, 10, 2 ); function replace_encoded_ampersand( $url, $form ) { $target_form_id = 727; // Change 727 to your form ID. if ( $target_form_id === (int) $form->id ) { $url = str_replace( ‘&’, ‘&’, $url ); } return $url;…Continue reading

Change the IP address of child entry

add_filter(‘frm_acf_repeater_child_entry_data’,’acf_change_ip_child_entry’, 10, 2); function acf_change_ip_child_entry( $entry_data, $args ) { if ( 10 == $args[‘parent_entry’]->id ) { $entry_data[‘ip’] = ‘127.0.0.1’; } return $entry_data; }Continue reading

Convert number field value to integer

add_filter(‘frm_acf_acf_to_frm’, ‘frm_acf_acf_convert_to_integer’, 10, 2); function frm_acf_acf_convert_to_integer( $new_value, $args ) { if ( ‘number’ === $args[‘acf_field’][‘type’] && ‘number’ === $args[‘frm_field’]->type ) { $new_value = intval( $new_value ); } return $new_value; }Continue reading