Add custom attribute to the modal button

add_filter(‘frm_modal_link’, ‘add_attr_modal_btn’, 10, 2); function add_attr_modal_btn( $link, $atts ) { $link = str_replace( ‘data-bs-toggle’, ‘data-custom-attr=”value” data-bs-toggle’, $link ); return $link; }Continue reading

Show total of items at the end of a table view

add_filter( ‘frm_display_inner_content_before_add_wrapper’, ‘table_view_total_row’, 10, 3 ); function table_view_total_row( $inner_content, $view, $args ) { if ( ! empty( $args[‘is_table_view’] ) ) { $total_columns = count( $args[‘box_content’] ); $total_items = count( $args[‘record_count’] ); $inner_content .= ‘<tr><td colspan=”‘ . intval( $total_columns ) .…Continue reading

Add custom class for table view

add_filter( ‘frm_views_table_class’, ‘table_view_class’, 10, 2 ); function table_view_class( $table_class, $args ) { // Remove zebra styling. $table_class = str_replace( ‘frm-alt-table’, ”, $table_class ); // Add custom class. $table_class .= ‘ your-custom-class’; return $table_class; }Continue reading

Limit options in TinyMCE Editor

add_filter(‘frm_rte_options’, ‘rte_limit_options’, 10, 2); function rte_limit_options($opts, $field){ $opts[‘tinymce’] = array(“toolbar1” => “undo redo bold italic alignleft aligncenter alignright alignjustify | bullist numlist outdent indent”); return $opts; }Continue reading

Reverse entry order in a repeater

add_filter(‘frmpro_fields_replace_shortcodes’, ‘reverse_entry_order_repeater’, 10, 4); function reverse_entry_order_repeater( $value, $tag, $atts, $field ) { if ( ! empty( $atts[‘foreach_entry_order’] ) && ‘desc’ === $atts[‘foreach_entry_order’] ) { arsort( $value ); } return $value; }Continue reading

Use custom font for specific entries

add_filter(‘frm_pdfs_css’, ‘custom_font_pdfs_css_entry’ ,10, 2); function custom_font_pdfs_css_entry( $css, $args ) { if ( empty( $args[‘id’] ) ) { // Check for entry ID. return $css; } if ( is_secondary_language_view( $args[‘id’] ) ) { return $css; } $custom_css = ‘body { font-family:…Continue reading

Change password icons

add_filter(‘frm_pro_show_password_icons’, ‘change_password_icons’); function change_password_icons( $icons ) { $icons[‘show’] = ‘new show icon’; $icons[‘hide’] = ‘new hide icon’; return $icons; }Continue reading

Wrap email confirmation input

add_filter(‘frm_conf_input_backend’, ‘wrap_email_conf_input’, 10, 2); function wrap_email_conf_input( $input_html, $args ) { if ( ’email’ === $args[‘field’][‘type’] ) { $input_html = ‘<span>’ . $input_html . ‘</span>’; } return $input_html; }Continue reading