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

Unprotect temporary files for all forms

add_filter( ‘frm_protect_temporary_file’, ‘unprotect_temporary_files’, 10, 2 ); function unprotect_temporary_files( $protect, $args ) { if ( FrmProFileField::file_is_an_image( $args[‘file_id’] ) ) { $protect = false; } return $protect; }Continue reading

Order dynamic options with conditionals

add_filter(‘frm_data_sort’, ‘frm_data_sort_conditional’, 30, 2); function frm_data_sort_conditional($options, $args) { $target_field_id = 100; // Change 100 to the child field ID. if ( $target_field_id === (int) $args[‘dynamic_field’][‘id’] ) { ksort( $options ); } return $options; }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