Remove created date from all PDF files

add_filter( ‘frm_pdfs_export_content’, ‘remove_timestamp_from_pdf_download’ ); function remove_timestamp_from_pdf_download( $content ) { $content = preg_replace( “/<p>((?!<\/p>).)*(\s)*Added on(\s)*\b.*?<\/p>/”, ”, $content, 1 ); return $content; }Continue reading

Use custom font

add_filter(‘frm_pdfs_css’, ‘custom_font_pdfs_css’, 10, 2); function custom_font_pdfs_css( $css, $args ) { $custom_css = ‘body { font-family: Dejavu Sans, sans-serif; }’; return $css . $custom_css; }Continue reading

Use true type font

add_filter(‘frm_pdfs_css’, ‘ttf_font_pdfs_css’, 10, 2); function ttf_font_pdfs_css( $css, $args ) { $custom_css = ” @font-face { font-family: ‘Seto’; font-style: normal; font-weight: normal; src: url(https://github.com/googlefonts/chinese/raw/gh-pages/fonts/SetoFont/setofont.ttf) format(‘truetype’); } body { font-family: Seto, sans-serif; } “; return $css . $custom_css; }Continue reading

Use custom font with CSS selector

add_filter(‘frm_pdfs_css’, ‘custom_font_pdfs_css_selector’,10, 2); function custom_font_pdfs_css_selector( $css, $args ) { $custom_css = ‘.custom-language-text { font-family: Dejavu Sans, sans-serif; }’; return $css . $custom_css; }Continue reading

Add approved source domain

add_filter(‘frm_signature_allowlist_domains’, ‘add_approved_src_domain’); function add_approved_src_domain($whitelisted_domains){ $whitelisted_domains[] = ‘cdn.formidableforms.com’; return $whitelisted_domains; }Continue reading

Open a target field

add_filter( ‘frm_section_is_open’, ‘open_section_for_target_field’, 10, 2 ); function open_section_for_target_field( $open, $field ) { $target_section_id = 18635; //Replace 18635 with the section field ID $id = is_object( $field ) ? $field->id : $field[‘id’]; if ( (int) $id === $target_section_id ) { $open…Continue reading

Open all sections in a target form

add_filter( ‘frm_section_is_open’, ‘open_section_for_target_form’, 10, 2 ); function open_section_for_target_form( $open, $field ) { $form_id = is_object( $field ) ? $field->form_id : $field[‘form_id’]; $target_form_id = 1012; //Replace 1012 with your form ID if ( (int) $form_id === $target_form_id ) { $open =…Continue reading

Force show form for message action

add_filter(‘frm_get_run_success_action_args’, ‘show_form_success_action_args’, 10, 3); function show_form_success_action_args( $new_args, $args, $action ) { if ( ‘message’ === $new_args[‘conf_method’] ) { $new_args[‘form’]->options[‘show_form’] = 1; } return $new_args; }Continue reading