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 one form

add_filter( ‘frm_protect_temporary_file’, ‘unprotect_temporary_files’, 10, 2 ); function unprotect_temporary_files( $protect, $args ) { $target_form_id = 117; // change 117 to the ID of your form if ( $target_form_id === (int) $args[‘form_id’] && FrmProFileField::file_is_an_image( $args[‘file_id’] ) ) { $protect = false; }…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