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

Add custom string to entry

add_filter( ‘frm_formatted_entry_values_content’, ‘add_formatted_entry_values_content’, 10, 2); function add_formatted_entry_values_content( $content, $args ) { if ( 10 == $args[‘entry’]->id && ‘new_format’ === $args[‘format’] ) { $content .= ‘<p>Some custom string</p>’; } return $content; }Continue reading

Display entry in a custom format

add_filter( ‘frm_entries_show_args’, ‘change_entries_show_args’, 10, 2); function change_entries_show_args( $show_args, $args ) { if ( 10 == $args[‘form’]->id ) { $show_args[‘format’] = ‘new_format’; } return $show_args; }Continue reading

Sort or remove fields

add_filter( ‘frm_entry_values_fields’, ‘sort_remove_fields’, 10, 2 ); function sort_remove_fields( $fields, $args ) { // Do anything with the $fields. // Your code here… return $fields; }Continue reading

Specify a field to exclude

add_filter( ‘frm_entry_values_exclude_fields’, ‘specify_exclude_fields’, 10, 2 ); function specify_exclude_fields( $field_ids, $atts ) { $field_ids[] = 3013; return $field_ids; }Continue reading

Set x-axis options

add_filter(‘frm_google_chart’, ‘frm_add_haxis_options’, 10, 2); function frm_add_haxis_options( $options, $atts ){ $options[‘hAxis’]= array( ‘textStyle’ => array( ‘color’ => ‘green’, ‘fontSize’ => ’18’, ‘bold’=> true ) ); return $options; }Continue reading