Show image in Lookup list type

add_filter( ‘frm_filtered_lookup_options’, ‘show_lookup_image’, 10, 2 ); function show_lookup_image( $options, $args ) { if ( $args[‘field’]->id === ’20’ ) { // Replace 20 with the ID of the field in the other form foreach ( $options as $k => $option )…Continue reading

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 custom data to the global JS

add_filter(‘frm_acf_global_js_data’, ‘acf_global_js_data’, 10, 2); function acf_global_js_data( $data, $args ) { $data[‘form_object’] = FrmForm::getOne( $args[‘form_id’] ); $data[‘strings’][‘custom_string’] = ‘Your custom string’; $data[‘custom_data’] = ‘Your custom data’; return $data; }Continue reading

Add custom data to the form action JS

add_filter(‘frm_acf_form_action_js_data’, ‘acf_form_action_js_data’, 10, 2); function acf_form_action_js_data( $data, $args ) { $data[‘form_action_id’] = $args[‘form_action’]->ID; return $data; }Continue reading

Increase quiz outcome limit

add_filter(‘frm_quiz_outcome_action_options’, ‘increase_quiz_outcome_limit’); function increase_quiz_outcome_limit( $options ) { $options[‘limit’] = 200; //Change 200 to your limit. return $options; } add_filter(‘frm_form_action_limit’, function( $limit ) { return 200; //Change 200 to your limit } );Continue reading