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 attribute to radio images dropdown

add_filter( ‘frm_radio_display_format_args’, ‘custom_radio_display_attribute’, 10, 2 ); function custom_radio_display_attribute( $args, $method_args ) { $args[‘input_attrs’][‘data-custom-value’] = ‘Custom value’; return $args; }Continue reading

Specify a field to include

add_filter( ‘frm_entry_values_include_fields’, ‘specify_include_fields’, 10, 2 ); function specify_include_fields( $field_ids, $atts ) { $field_ids[] = 13; return $field_ids; }Continue reading

Hide a specific field in the lookup selection

add_filter(‘frm_pro_fields_in_lookup_selection’, ‘hide_specific_field_lookup_selection’, 10, 2); function hide_specific_field_lookup_selection( $fields, $args ) { foreach ( $fields as $index => $field ) { if ( 13 == $field->id ) { //Replace 13 with the ID of your field unset( $fields[ $index ] ); }…Continue reading