Allow ampersands in redirect URL

add_filter( ‘frm_redirect_url’, ‘replace_encoded_ampersand’, 10, 2 ); function replace_encoded_ampersand( $url, $form ) { $target_form_id = 727; // Change 727 to your form ID. if ( $target_form_id === (int) $form->id ) { $url = str_replace( ‘&’, ‘&’, $url ); } return $url;…Continue reading

Change the IP address of child entry

add_filter(‘frm_acf_repeater_child_entry_data’,’acf_change_ip_child_entry’, 10, 2); function acf_change_ip_child_entry( $entry_data, $args ) { if ( 10 == $args[‘parent_entry’]->id ) { $entry_data[‘ip’] = ‘127.0.0.1’; } return $entry_data; }Continue reading

Convert number field value to integer

add_filter(‘frm_acf_acf_to_frm’, ‘frm_acf_acf_convert_to_integer’, 10, 2); function frm_acf_acf_convert_to_integer( $new_value, $args ) { if ( ‘number’ === $args[‘acf_field’][‘type’] && ‘number’ === $args[‘frm_field’]->type ) { $new_value = intval( $new_value ); } return $new_value; }Continue reading

Include form title and description

add_filter( ‘frm_pdfs_export_content’, ‘add_title_and_description_to_pdf’, 10, 2 ); function add_title_and_description_to_pdf( $content, $args ) { $target_form_id = 385; // Change 385 to the ID of your form $form_id = (int) $args[‘entry’]->form_id; if ( $target_form_id !== $form_id ) { return $content; } $form =…Continue reading

Change CSV log filename

add_filter(‘frm_logs_csv_filename’, ‘change_logs_csv_filename’, 10, 2); function change_logs_csv_filename($filename){ $filename = date(“ymdHis”,time()) . ‘_formidable_logs.csv’;//Change the filename here return $filename; }Continue reading

Change the array separator

add_filter(‘frm_pdfs_show_args’, ‘change_array_separator’, 10, 2); function change_array_separator( $show_args, $args ) { $show_args[‘array_separator’] = ‘|’; return $show_args; }Continue reading

Save the ID of created post in a field

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

Filter graphs with y-min parameter

function filter_graph_data_to_match_min_x( $data, $atts ) { if ( ! isset( $atts[‘x_min’] ) ) { return $data; } return array_values( array_filter( $data, function( $row ) use ( $atts ) { return $row[1] >= floatval( $atts[‘x_min’] ); } ) ); } add_filter(…Continue reading