Customize downloaded PDF filename to match post title

add_filter(‘frm_pdfs_export_file_name’, ‘use_post_title_for_pdf_filename’ , 10, 2); function use_post_title_for_pdf_filename( $file_name, $args ) { $target_form_id = 23; //Change 23 to the ID of the form. if ( $target_form_id !== (int) $args[‘entry’]->form_id ) { return $file_name; } $post_id = $args[‘entry’]->post_id; if ( ! $post_id…Continue reading

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

Apply a view for the attached PDF

add_filter( ‘frm_pdfs_email_attachment_args’, ‘add_view_to_attached_pdf’, 10, 2 ); function add_view_to_attached_pdf( $pdf_args, $args ) { $pdf_args[‘view’] = 10; // ID of view. $pdf_args[‘id’] = $args[‘entry’]->id; // Do this to show the detail view, otherwise, it shows the listing view. return $pdf_args; }Continue reading

Change the attached PDF file name

add_filter( ‘frm_pdfs_email_attachment_args’, ‘change_attached_pdf_file_name’, 10, 2 ); function change_attached_pdf_file_name( $pdf_args, $args ) { $pdf_args[‘filename’] = ‘stuff’; return $pdf_args; }Continue reading

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 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

Save geolocation coordinates from address field

add_filter(‘frm_validate_field_entry’, ‘store_address_coordinates’, 10, 3); function store_address_coordinates($errors, $posted_field, $posted_value){ $fields = array( 31014, 31015); //Change 31014 and 31015 to IDs of the hidden fields where the longitude and latitude coordinates should be stored. if ( in_array( $posted_field->id, $fields ) ) {…Continue reading

Generate custom entry key

add_filter(‘frm_validate_entry’, ‘generate_item_key’, 20, 2); function generate_item_key($errors, $values){ if ( $values[‘form_id’] == 671 && $values[‘frm_action’]== “create” ) { //Change 45 to the ID of your form $validchars = ‘0123456789abcdefghijklmnopqrstuvwxyz’; //Change the string to your preferred characters $generatedkey = substr(str_shuffle($validchars), 0, 7);…Continue reading