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

Wrap the label in a div

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

Remove all Likert fields from a form

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

Rename timestamp column

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

Remove IP column

add_filter( ‘frm_export_csv_headings’, ‘remove_ip_from_csv_export’ ); function remove_ip_from_csv_export( $headings ) { unset( $headings[‘ip’] ); return $headings; }Continue reading

Add custom display format option

add_filter( ‘frm_radio_display_format_options’, ‘custom_radio_display_format_options’, 10, 2); function custom_radio_display_format_options( $options ) { $options[‘custom-format’] = array( ‘text’ => ‘Custom format’, ‘svg’ => ‘custom-icon-in-option’, // You can use filter `frm_images_dropdown_option_image` to change the image or icon later. ); }Continue reading

Add custom HTML attribute to radio inputs

add_filter( ‘frm_images_dropdown_input_attrs’, ‘add_html_attrs_radio_image_dropdown’, 10, 2); function add_html_attrs_radio_image_dropdown( $input_attrs, $args ) { $input_attrs .= ‘ data-custom-value=”Custom value”‘; return $input_attrs; }Continue reading

Use the image URL

add_filter( ‘frm_images_dropdown_option_image’, ‘use_url_image_dropdown’, 10, 2); function use_url_image_dropdown( $image, $args ) { if ( ! empty( $args[‘image_url’] ) ) { return ‘<img src=”‘ . esc_url( $args[‘image_url’] ) . ‘” />’; } return $image; }Continue reading

Add custom HTML to submit button

add_filter( ‘frm_submit_button_html’, ‘add_custom_html_to_submit_button’, 10, 2 ); function add_custom_html_to_submit_button( $button, $args ) { $target_form_id = 220; // change 220 to the ID of the form if ( $target_form_id === (int) $args[‘form’]->id ) { // put HTML before the submit button $button…Continue reading

Skip validation for a specific field

add_filter( ‘frm_fields_to_validate’, ‘skip_validation_for_a_specific_field’, 10, 2 ); function skip_validation_for_a_specific_field( $fields, $args ) { $target_form_id = 220; // change 220 to the ID of the form if ( $target_form_id === (int) $args[‘values’][‘form_id’] ) { $field_id_to_remove = 1204; // change 1204 to the…Continue reading