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

Basic example

add_filter(‘frm_pdfs_css’, ‘modify_pdfs_css’ , 10, 2); function modify_pdfs_css( $css, $args ) { // Modify the CSS here. return $css; }Continue reading

Filter output of frm-pdf shortcode

add_filter(‘frm_pdfs_default_shortcode_atts’, ‘filter_default_atts’); function filter_default_atts( $atts ) { $atts[‘rel’] = ‘nofollow’; // Default is rel=”nofollow”. return $atts; } add_filter(‘frm_pdfs_shortcode_output’, ‘filter_output_shortcode’, 10, 2); function filter_output_shortcode( $output, $atts ) { if ( ! empty( $atts[‘label’] ) ) { $output = str_replace( ‘<a’, ‘<a…Continue reading

Filter output of frm-pdf shortcode

add_filter(‘frm_pdfs_default_shortcode_atts’, ‘filter_default_atts’); function filter_default_atts( $atts ) { $atts[‘rel’] = ‘nofollow’; // Default is rel=”nofollow”. return $atts; } add_filter(‘frm_pdfs_shortcode_output’, ‘filter_output_shortcode’, 10, 2); function filter_output_shortcode( $output, $atts ) { if ( ! empty( $atts[‘label’] ) ) { $output = str_replace( ‘<a’, ‘<a…Continue reading