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

Add custom HTML attributes to each option

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

Add custom heading

add_filter( ‘frm_export_csv_headings’, ‘add_custom_heading_in_csv_export’ ); function add_custom_heading_in_csv_export( $headings ) { $headings[‘an_extra_column’] = ‘New column name’; return $headings; }Continue reading

Hide a specific field in the dynamic selection

add_filter(‘frm_pro_fields_in_dynamic_selection’, ‘hide_specific_field_dynamic_selection’, 10, 2); function hide_specific_field_dynamic_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

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

Wrap the images dropdown

add_filter( ‘frm_images_dropdown_output’, ‘wrap_image_dropdown’, 10, 2); function wrap_image_dropdown( $output, $args ) { return ‘<div class=”your-custom-class”>’ . $output . ‘</div>’; }Continue reading

Entry counter for each user

add_filter(‘frm_validate_field_entry’, ‘add_user_entry_counter’, 10, 3); function add_user_entry_counter($errors, $posted_field, $posted_value){ $field_id = 2806; // Change 2806 to the ID of the user entry counter field. if ( $posted_field->id == $field_id ) { $previous_value = FrmProEntriesController::get_field_value_shortcode( array( ‘field_id’ => $field_id, ‘user_id’ => ‘current’…Continue reading

Remove all Likert fields on one form

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