Add a custom value to the arguments

add_filter( ‘frm_images_dropdown_args’, ‘add_custom_args_image_dropdown’, 10, 2); function add_custom_args_image_dropdown( $new_args, $args ) { $new_args[‘your_custom_args’] = ‘Your custom args’; return $new_args; }Continue reading

Save the entry Key in a field

add_action( ‘frm_after_create_entry’, ‘frm_add_entry_id’, 42, 2 ); function frm_add_entry_id( $entry_id, $form_id ) { if ( $form_id == 221 ) { //change 221 to the ID of your form $entry = FrmEntry::getOne( $entry_id ); $key = $entry->item_key; FrmEntryMeta::add_entry_meta( $entry_id, 1819, “”, $key);//change…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

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

Remove all Likert fields from the form settings

add_filter( ‘frm_fields_in_settings’, ‘remove_likert_form_settings’, 10, 2); function remove_likert_form_settings( $fields, $args ) { if ( 13 != $args[‘form’]->id ) { return $fields; // Do not modify fields if this is not the form you want. } // Remove all Likert fields. foreach…Continue reading