Hide meta for a specific user ID

add_filter( ‘frmreg_show_meta_on_profile’, ‘hide_meta_for_specific_user’, 10, 2 ); function hide_meta_for_specific_user( $show, $user_profile ) { $target_user_id = 43; // Replace 43 with the ID of the User ID field. if ( $user_profile instanceof WP_User && $target_user_id === $user_profile->ID ) { $show = false;…Continue reading

Change login limit message

add_filter(‘frm_reg_login_limit_exceeded_error_message’, ‘change_login_limit_message’); function change_login_limit_message( $message ) { if ( $message ) { $message = ‘You have been locked out for having too many failed login attempts’; } return $message; }Continue reading

Create a Leaderboard

add_filter( ‘frm_view_order’, ‘frm_order_by_sum’, 10, 2 ); function frm_order_by_sum( $query, $args ) { global $wpdb; if ( $args[‘display’]->ID != 1478 ) { // Change 1478 to the id of your View. return $query; } $total_field_id = 4235; // Change 4235 to…Continue reading

Replace product field options

add_filter( ‘frm_setup_new_fields_vars’, ‘frm_populate_posts’, 20, 2 ); add_filter( ‘frm_setup_edit_fields_vars’, ‘frm_populate_posts’, 20, 2 ); function frm_populate_posts( $values, $field ) { $target_field_id = 278; // Replace 278 with the ID of the product field. if ( (int) $field->id !== $target_field_id ) { return…Continue reading

Remove Line 2 from address field

add_filter( ‘frm_address_sub_fields’, ‘remove_line2_from_address_field’, 10, 2 ); function remove_line2_from_address_field( $sub_fields, $field ) { $target_field_id = 5269; // change this. if ( $target_field_id !== (int) $field[‘id’] ) { return $sub_fields; } unset( $sub_fields[‘line2’] ); return $sub_fields; }Continue reading

Increase limit for email actions

add_filter(‘frm_email_control_settings’, function( $options ) { $options[‘limit’] = 200; // Change 200 to your limit return $options; } ); add_filter(‘frm_form_action_limit’, function( $limit ) { return 200; //Change 200 to your limit } );Continue reading

Apply Alt text to uploaded images in a repeater

add_filter(‘frm_validate_field_entry’, ‘add_alt_text_form_images’, 10, 4); function add_alt_text_form_images($errors, $posted_field, $posted_value, $args){ if ( $posted_field->id == 14548 ) { // Change 14548 with the ID of your repeater field $image_field_id=14550; // Change 5844 to the ID of the file upload field $alt_text_field_id=14551; //…Continue reading