Save highest and lowest fields

add_filter( ‘frm_validate_entry’, ‘frm_save_highest_and_lowest’, 20, 2 ); function frm_save_highest_and_lowest( $errors, $values ) { if ( $values[‘form_id’] !== 173 ) { // Change 173 to the id of your form. return $errors; } $fields = array( 2330, 2331, 2332, 2333, 2334 );//…Continue reading

Remove all Likert fields from the form builder

add_filter( ‘frm_fields_in_form_builder’, ‘remove_likert_form_builder’, 10, 2); function remove_likert_form_builder( $fields, $args ) { if ( 13 != $args[‘form’]->id ) { return $fields; // Do not modify fields if this is not the form you want. } // Remove all Likert fields. foreach…Continue reading

Remove all Likert fields from the form settings

add_filter( ‘frm_fields_in_settings’, ‘remove_likert_form_settings’, 10, 2); function remove_likert_form_settings( $fields, $args ) { if ( 13 != $args[‘form’]->id ) { return $fields; // Do not modify fields if this is not the form you want. } // Remove all Likert fields. foreach…Continue reading

Include fields by id

add_filter( ‘frm_quiz_score_field’, ‘include_fields_in_quiz_score’, 10, 2 ); function include_fields_in_quiz_score( $count_field, $args ) { $forms = array( 203, 210 ); // List the ids of the quiz forms whose scoring you want to determine with this snippet if ( ! in_array( $args[‘field’]->form_id,…Continue reading

Remove all Likert fields from the tags box

add_filter( ‘frm_fields_in_tags_box’, ‘remove_likert_tags_box’, 10, 2); function remove_likert_tags_box( $fields, $args ) { if ( 13 != $args[‘form_id’] ) { return $fields; // Do not modify fields if this is not the form you want. } // Remove all Likert fields. foreach…Continue reading

Change fields before they display in Table View popup

add_filter( ‘frm_views_fields_in_create_view_popup’, ‘change_fields_before_display_in_table_view_popup’ ); function change_fields_before_display_in_table_view_popup( $fields ) { // modify the $fields before they are added to the new table view pop up. return $fields; }Continue reading

Include padding settings

// Add the padding setting in the field. add_action( ‘frm_field_options’, ‘my_custom_function’ ); function my_custom_function( $args ) { $field = $args[‘field’]; $is_text_input = FrmField::is_field_type( $field, ‘text’ ); // replace ‘text’ with the type of the field you need to evaluate –…Continue reading

Check for a match without including IP

add_filter( ‘frm_duplicate_check_val’, ‘my_custom_function’ ); function my_custom_function( $check_val ) { if ( 123 === (int) $check_val[‘form_id’] ) { //replace 123 with the id of the form you need to catch unset( $check_val[‘ip’] ); } return $check_val; }Continue reading

Close forms on the weekend

add_action( ‘frm_display_form_action’, ‘frm_close_form_on_weekends’, 8, 3 ); function frm_close_form_on_weekends( $params, $fields, $form ) { remove_filter( ‘frm_continue_to_new’, ‘__return_false’, 50 ); if ( in_array( $form->id, array( 214, 216, 217 ) ) && ! is_admin() ) { //replace 214, 216, 217 with the ids…Continue reading