Wrap all grid items inside a custom wrapper

add_filter( ‘frm_display_inner_content_before_add_wrapper’, ‘grid_view_custom_wrapper’, 10, 3 ); function grid_view_custom_wrapper( $inner_content, $view, $args ) { if ( ! empty( $args[‘is_grid_view’] ) ) { $inner_content = ‘<div class=”frm_grid_container”>’ . $inner_content . ‘</div>’; } return $inner_content; }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

Exclude some On Submit actions

add_filter(‘frm_get_met_on_submit_actions’, ‘frm_exclude_on_submit_actions’, 10, 2); function frm_exclude_on_submit_actions( $met_actions, $args ) { foreach ( $met_actions as $index => $action ) { if ( 10 == $action->ID ) { unset( $met_actions[ $index ] ); } } return $met_actions; }Continue reading

Show only future dates in a lookup field

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

Prepend field value to filename

add_filter(‘frm_pdfs_export_file_name’, ‘prepend_field_value’ , 10, 2); function prepend_field_value( $file_name, $args ) { $entry_id=$args[‘entry’]->id; $fieldvalue=FrmProEntriesController::get_field_value_shortcode(array(‘field_id’ => 2, ‘entry’ => $entry_id)); //change 2 to the ID of the field where the unique value is stored in your form $file_name = $fieldvalue. ‘-‘ .…Continue reading

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