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

Limit geo graph to specific region

add_filter(‘frm_google_chart’, ‘frm_limit_graph_region’, 10, 2); function frm_limit_graph_region( $options, $args ) { if ( isset( $args[‘atts’][‘title’] ) && $args[‘atts’][‘title’] == ‘My graph title’ ) { $options[‘region’] = ‘IT’; } return $options; }Continue reading

Set title with special characters

add_filter(‘frm_google_chart’, ‘frm_set_custom_graph_title’, 10, 2); function frm_set_custom_graph_title( $options, $args ) { if ( isset( $args[‘atts’][‘title’] ) && $args[‘atts’][‘title’] == ‘My graph title’ ) { $options[‘title’] = ‘Test & Testing’; } return $options; }Continue reading

Add class to radio field

add_filter( ‘frm_radio_class’, ‘add_radio_class’, 10, 3 ); function add_radio_class( $class, $field, $field_value ) { if ( $field[‘id’] == 5 ) { // change 5 to your field id $class .= ‘ add_class_here’; } return $class; }Continue reading

Limit submissions per time period (or any stat)

add_filter(‘frm_validate_entry’, ‘check_submitted’, 20, 2); function check_submitted($errors, $values){ if ( $values[‘form_id’] !== 30 ) {//Change 30 to the ID of your form return $errors; } $entries_submitted = FrmProStatisticsController::stats_shortcode( array( ‘id’ => 182, ‘type’ => ‘count’, ‘user_id’ => ‘current’, ‘created_at_greater_than’ => ‘Monday…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