Add extra custom HTML to start page

add_filter(‘frm_chat_start_page_content’, ‘frm_chat_add_html’, 10, 2); function frm_chat_add_html( $start_page_content, $args ) { $target_form_id = 310; // change 310 to your form ID. if ( $target_form_id === (int) $args[‘form’]->id ) { $start_page_content .= ‘<br>’; $start_page_content .= ‘Additional start page content’; } return $start_page_content;…Continue reading

Add gallery to WooCommerce product

add_action(‘frm_after_create_entry’, ‘frm_add_gallery_to_product’, 60, 2); function frm_add_gallery_to_product( $entry_id, $form_id ) { if ( $form_id == 1705 ) {// Replace 1705 with the ID of your form $entry = FrmEntry::getOne( $entry_id ); if ( ! $entry->post_id ) { return; } update_post_meta($entry->post_id, ‘_product_image_gallery’,…Continue reading

Exclude a specific field from a summary field

add_filter( ‘frm_pro_fields_in_summary_values’, ‘exclude_field_from_summary’, 10, 2 ); function exclude_field_from_summary( $fields, $args ) { $target_form_id = 302; // Replace 302 with ID of your form if ( $target_form_id !== (int) $args[‘form_id’] ) { return $fields; } $field_id_to_remove = 1460; // Replace 1460…Continue reading

Set filename for CSV email attachment

add_filter(‘frm_csv_filename’, ‘change_csv_filename_attachment’, 10, 3); function change_csv_filename_attachment( $filename, $form, $args ) { if ( empty( $args[‘meta’] ) ) { return $filename; } $target_action_id = 158; // change 158 with the email form action ID $meta = $args[‘meta’]; if ( ! empty(…Continue reading

Change entry formatter class for a specific form

add_filter( ‘frm_entry_formatter_class’, ‘change_entry_formatter_class’, 10, 2); function change_entry_formatter_class($formatter_class, $atts) { if ( 10 == $atts[‘form_id’] ) { $formatter_class = ‘YourCustomEntryFormatter’; } return $formatter_class; }Continue reading

Basic example

add_filter( ‘frm_prepend_and_or_where’, ‘change_prepend_and_or_where’, 10, 2); function change_prepend_and_or_where($where, $starts_with ) { // Do something. return $where; }Continue reading

Add new format value

add_filter( ‘frm_entry_formatter_format’, ‘add_entry_formatter_format’, 10, 2); function add_entry_formatter_format( $format, $args ) { if ( isset( $args[‘atts’][‘format’] ) && ‘new_format’ === $args[‘atts’][‘format’] ) { $format = ‘new_format’; } return $format; }Continue reading