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

Set post status based on user role

add_filter( ‘frm_new_post’, ‘set_post_status’, 10, 2 ); function set_post_status( $post, $args ) { if ( $args[‘form’]->id == 68 ) { //change 68 to the ID of your form $role = $_POST[‘item_meta’][41065]; //Change 41065 to the ID of the hidden field with…Continue reading

Basic Example

add_filter(‘frm_pdfs_access_code_max_days’, ‘filter_access_code_max_days’); function filter_access_code_max_days() { return 7; // Replace 7 with the number of days. }Continue reading

Fix images from unsafe HTTPs

add_filter(‘frm_pdfs_dompdf_args’, ‘fix_images_unsafe_https’ ); function fix_images_unsafe_https( $args ) { if ( ! isset( $args[‘http_context’] ) ) { $args[‘http_context’] = array(); } if ( ! isset( $args[‘http_context’][‘ssl’] ) ) { $args[‘http_context’][‘ssl’] = array(); } $args[‘http_context’][‘ssl’][‘verify_peer’] = false; return $args; }Continue reading

Prevent Line Break

add_filter(‘frm_logs_csv_line_break’, ‘prevent_log_csv_line_break’); function prevent_log_csv_line_break(){ return ‘<br />’; //change this to what you want to use in place of line breaks }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