Basic example
add_filter( ‘frm_create_cookies’, ‘__return_false’ );Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_filter( ‘frm_create_cookies’, ‘__return_false’ );Continue reading
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
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
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
add_filter( ‘frm_hubspot_webhook_deletion’, ‘__return_false’ );Continue reading
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
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
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
add_filter(‘frm_acf_supported_field_types’, ‘acf_map_text_to_email’); function acf_map_text_to_email( $field_types ) { $field_types[‘text’][] = ’email’; return $field_types; }Continue reading
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