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

Add custom CSS variable to the Likert field

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

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

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