Remove a specific field from CSV export

add_filter( ‘frm_fields_for_csv_export’, ‘remove_specific_field_from_csv_export’, 10, 2 ); function remove_specific_field_from_csv_export( $fields, $args ) { $target_form_id = 220; // change 220 to the ID of the form if ( $target_form_id === (int) $args[‘form’]->id ) { $target_field_id = 1204; // change 1204 to the…Continue reading

Limit event registration

add_filter( ‘frm_validate_entry’, ‘event_registration’, 20, 2 ); function event_registration( $errors, $values ) { if ( $values[‘form_id’] !== 304 ) {//Change 304 to the ID of your form return $errors; } $registration_field = 3080;// Set this field to the id of the…Continue reading

Unprotect temporary files for one form

add_filter( ‘frm_protect_temporary_file’, ‘unprotect_temporary_files’, 10, 2 ); function unprotect_temporary_files( $protect, $args ) { $target_form_id = 117; // change 117 to the ID of your form if ( $target_form_id === (int) $args[‘form_id’] && FrmProFileField::file_is_an_image( $args[‘file_id’] ) ) { $protect = false; }…Continue reading

Unprotect temporary files for all forms

add_filter( ‘frm_protect_temporary_file’, ‘unprotect_temporary_files’, 10, 2 ); function unprotect_temporary_files( $protect, $args ) { if ( FrmProFileField::file_is_an_image( $args[‘file_id’] ) ) { $protect = false; } return $protect; }Continue reading

Order dynamic options with conditionals

add_filter(‘frm_data_sort’, ‘frm_data_sort_conditional’, 30, 2); function frm_data_sort_conditional($options, $args) { $target_field_id = 100; // Change 100 to the child field ID. if ( $target_field_id === (int) $args[‘dynamic_field’][‘id’] ) { ksort( $options ); } return $options; }Continue reading

Add custom CSS variable to the Likert field

add_filter(‘frm_surveys_likert_css_variables’, ‘add_surveys_likert_css_variables’, 10, 2); function add_surveys_likert_css_variables( $variables, $field ) { if ( 13 == $field[‘id’] ) { //Replace 13 with the ID of your field $variables[‘–custom-variable’] = ‘1000px’; } return $variables; }Continue reading

Save the ID of copy field to new field option

add_filter(‘frm_after_duplicate_field’, ‘frm_save_id_duplicate_field’, 10, 2); function frm_save_id_duplicate_field( $args ) { $new_field_options = $args[‘values’][‘field_options’]; $new_field_options[‘copied_from’] = $copy_field->id; FrmField::update( $field_id, array( ‘field_options’ => $new_field_options ) ); }Continue reading