Force Success Message and Change Message

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

Show comma-separate values as a list

add_filter( ‘frmpro_fields_replace_shortcodes’, ‘frm_show_list’, 10, 4 ); function frm_show_list( $replace_with, $tag, $atts, $field ) { if ( ! isset( $atts[‘show_list’] ) ) { return $replace_with; } $sep = isset( $atts[‘sep’] ) ? $atts[‘sep’] : ‘<br>’; return str_replace( ‘, ‘, $sep, $replace_with…Continue reading

Change a word

add_filter( ‘frm_filter_final_form’, ‘change_edit_label’ ); function change_edit_label( $form ){ $form = str_replace( ‘Edit’, ‘Revise’, $form ); return $form; }Continue reading

Store file upload URL in another field

add_filter(‘frm_validate_field_entry’, ‘filename_to_field’, 10, 3); function filename_to_field($errors, $posted_field, $posted_value){ if ( $posted_field->id == 25 ) { //change 25 to the ID of the field to store the file url in $_POST[‘item_meta’][$posted_field->id] = wp_get_attachment_url( $_POST[‘item_meta’][20] ); //Change 20 to the ID of…Continue reading

Add class to form based on param

add_action( ‘frm_form_classes’, ‘frm_add_new_class’ ); function frm_add_new_class( $form ) { if ( ! isset( $_GET[‘add_class’] ) ) { return; } $new_class = $_GET[‘add_class’]; $new_class = utf8_decode( urldecode( $new_class ) ); echo esc_html( $new_class ); }Continue reading

Modify the search value

add_filter( ‘frm_filter_admin_entries’, ‘custom_query’, 10, 2 ); function custom_query( $query, $args ) { $fid = ‘id’; if ( $args[‘field_id’] === $fid ) { $query[‘it.’ . $fid][0] = ‘new value to search’; } return $query; }Continue reading

Add new search option

add_filter( ‘frm_admin_search_options’, ‘add_search_option’, 10, 2 ); function add_search_option( $options, $args ) { array_push( $options, ‘IP’ ); return $options; }Continue reading

Run all shortcodes

add_filter( ‘frm_action_logic_value’, ‘frm_change_logic_value’ ); function frm_change_logic_value( $logic_value ) { $logic_value = do_shortcode( $logic_value ); return $logic_value; }Continue reading

Format an email address

add_filter( ‘frm_display_email_value_custom’, ‘frm_email_val’, 15, 2 ); function frm_email_val( $value, $atts ) { if ( $atts[‘field’]->id == 500 ) { // Change 500 to the ID of your email field $value = ‘<a href=”mailto:’ . $value . ‘”>’ . $value .…Continue reading

Disallow duplicate entries in a specific form for one year

add_filter(‘frm_time_to_check_duplicates’, ‘change_duplicate_time_limit_one_form’, 10, 2); function change_duplicate_time_limit_one_form( $time_limit, $entry_values ) { if ( $entry_values[‘form_id’] == 100 ) { //change 100 to your form ID $time_limit = 31536000; } return $time_limit; }Continue reading