Save day of week

add_filter( ‘frm_validate_field_entry’, ‘frm_get_day_of_week’, 11, 3 ); function frm_get_day_of_week( $errors, $field, $value ) { if ( $field->id == 847 ) { //change 847 to the ID of the Hidden or text field which will hold the day of the week $date…Continue reading

Allow brackets in redirect URL

add_filter( ‘frm_redirect_url’, ‘partial_prepare_redirect_url’, 1 ); function partial_prepare_redirect_url( $url ) { remove_filter( ‘frm_redirect_url’, ‘FrmEntriesController::prepare_redirect_url’ ); return str_replace( array( ‘ ‘, ‘|’, ‘@’ ), array( ‘%20’, ‘%7C’, ‘%40’ ), $url ); }Continue reading

Set a custom path

add_filter(‘frm_upload_folder’, ‘frm_custom_upload’); function frm_custom_upload($folder){ $folder = ‘../../wp-content/uploads/product_images/’; return $folder; }Continue reading

Limit submissions by any stat

add_action( ‘frm_display_form_action’, ‘limit_entry_by_stat’, 8, 3 ); function limit_entry_by_stat( $params, $fields, $form ) { remove_filter( ‘frm_continue_to_new’, ‘__return_false’, 50 ); if ( $form->id == 194 ) { //change 194 to your form ID $count = FrmProStatisticsController::stats_shortcode( array( ‘id’ => 893, ‘type’ =>…Continue reading

Re-order fields in cart

add_filter( ‘wc_fp_cart_fields’, ‘frm_reorder_wc_cart_fields’, 10, 2 ); function frm_reorder_wc_cart_fields( $fields, $form_id ) { if ( $form_id == 12 ) { $reordered_fields = array(); foreach ( $fields as $key => $field ) { if ( $field->id == 123 ) { $reordered_fields[0] =…Continue reading

Show only for admins

add_filter( ‘frm_show_delete_all’, ‘frm_maybe_hide_button’ ); function frm_maybe_hide_button( $show ) { $show = current_user_can(‘administrator’); return $show; }Continue reading

Filter a field for one of two values

add_filter( ‘frm_where_filter’, ‘frm_custom_or_filter’, 10, 2 ); function frm_custom_or_filter( $where, $args ) { $view_id = 118;// Replace with your View ID $field = 165;// Replace with ID of your field $search_val_1 = ‘toy‘;// Replace with the first value $search_val_2 = ‘book‘;//…Continue reading