Blackout dynamic dates

add_filter( ‘frm_date_field_options’, ‘add_blackout_dates’, 30, 2 ); function add_blackout_dates( $js_options, $extra ) { if ( $extra[‘field_id’] === ‘field_jtumj’ ) { // Replace jtumj with your field key $js_options[‘formidable_dates’][‘datesDisabled’][] = date( ‘Y-m-d’, strtotime( ‘first day of january’ ) ); } return $js_options;…Continue reading

Hide month and year selectors

add_filter( ‘frm_date_field_options’, ‘hide_month_and_year’, 30, 2 ); function hide_month_and_year( $js_options, $extra ) { if ( $extra[‘field_id’] === ‘field_jtumj’ ) { // Replace jtumj with your field key $js_options[‘options’][‘changeMonth’] = false; $js_options[‘options’][‘changeYear’] = false; } return $js_options; }Continue reading

Add calendar icon to field

add_filter( ‘frm_date_field_options’, ‘add_cal_icon’, 30, 2 ); function add_cal_icon( $js_options, $extra ) { if ( $extra[‘field_id’] === ‘field_jtumj‘ ) { // Replace jtumj with your field key $js_options[‘options’][‘showOn’] = ‘button’; $js_options[‘options’][‘buttonImage’] = ‘http://jqueryui.com/resources/demos/datepicker/images/calendar.gif’; $js_options[‘options’][‘buttonImageOnly’] = true; } return $js_options; }Continue reading

Change Order of Categories

add_filter(‘frm_get_categories’, ‘frm_order_cats’, 10, 2); function frm_order_cats($args, $field){ if($field[‘id’] == 25){ //change 25 to the ID of your field $args[‘orderby’] = ‘ID’; } return $args; }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