Create an entry for each user

add_action(‘frm_after_create_entry’, ‘frm_create_entry_for_each_user’, 30, 2); function frm_create_entry_for_each_user( $entry_id, $form_id ) { global $wpdb; if ( $form_id != 527 ) { //Change 527 to the id of the Trigger form return; } $directory_form = ‘526’; // Change 526 to the id of…Continue reading

Remove a field from PDF file

add_filter( ‘frm_pdfs_fields_for_export’, ‘remove_field_from_pdf’, 10, 2); function remove_field_from_pdf( $fields, $args ) { if ( 10 == $args[‘entry’]->id ) { // Replace 10 with your entry ID foreach ( $fields as $index => $field ) { if ( 13 == $field->id )…Continue reading

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