Prevent file switching with file protection
add_filter( ‘frm_stop_file_switching’, ‘__return_true’ );Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_filter( ‘frm_stop_file_switching’, ‘__return_true’ );Continue reading
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
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
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_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
add_filter(‘frm_likert_html’, ‘display_likert_html’, 10, 2); function display_likert_html( $html ) { return ‘ %1$s: %2$s ‘; }Continue reading
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
add_filter(‘frm_choice_field_option_label’, ‘frm_wrap_choice_option_label’, 10, 2); function frm_wrap_choice_option_label( $label, $args ) { return ‘<div class=”your-custom-class”>’ . $label . ‘</div>’; }Continue reading
add_filter(‘frm_fields_in_form’, ‘frm_remove_likert_in_form’, 10, 2); function frm_remove_likert_in_form( $fields, $args ) { if ( 13 == $args[‘form’]->id ) { //Replace 13 with the ID of your field foreach ( $fields as $index => $field ) { if ( ‘likert’ == $field[‘type’] )…Continue reading
add_filter( ‘frm_export_csv_headings’, ‘rename_timestamp_column_in_csv_export’ ); function rename_timestamp_column_in_csv_export( $headings ) { $headings[‘created_at’] = ‘New Timestamp Column Name’; return $headings; }Continue reading