Formidable Forms

The Most Advanced WordPress Forms Plugin and Form Builder

  • Features
  • Pricing
  • Blog
  • Support
  • Login
  • Get Formidable Forms

frm_filter_final_form

Last Updated: May 2, 2018

Knowledge Base → Extend Formidable Forms → Formidable Hooks - for Developers → Form Appearance → frm_filter_final_form
Heads up!
This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.

This hook can be used to make changes to the rendered form content before it is returned by the form shortcode.

Usage

add_filter( 'frm_filter_final_form', 'filter_hide_this' );
function filter_hide_this( $form )

Parameters

  • $form (string)

Examples

Use shortcode throughout HTML in form

You can use this this example code to place opening and closing shortcode tags to span throughout HTML fields in the form. This particular example shows how to use the shortcode for the Hide This plugin.

add_filter( 'frm_filter_final_form', 'filter_hide_this' );
function filter_hide_this( $form ) {
  global $shortcode_tags;
  $original_shortcodes = $shortcode_tags;
  $limited_shortcodes = array( 'hidethis' => $shortcode_tags['hidethis'] );
  $shortcode_tags = $limited_shortcodes;
  $form = do_shortcode( $form );
  $shortcode_tags = $original_shortcodes;
  return $form;
}

add_filter( 'frm_do_html_shortcodes', '__return_false' );

Minimize the form without the shortcode

The easiest way to minimize the form HTML is by adding minimize=1 to your [formidable] shortcode. But if every form on your site needs to be minimized, you can strip out the white space before it can be converted to <p> or <br/> tags with this:

Formidable Forms is the best WordPress Form Builder plugin. Get it for free!
add_filter( 'frm_filter_final_form', 'auto_minimize_forms' );
function auto_minimize_forms( $form ) {
  $form = str_replace( array( "rn", "r", "n", "t", '    ' ), '', $form );
  return $form;
}

Change a word

Use this code example to change a word or phrase in a form to another word or phrase. For example, you can change the word "Edit" that appears in the Summary field to "Revise."

To use the code example, replace "Edit" with the word or phrase you want to change and "Revise" with the word or phrase to which you want to change it.

Note: this code example will change all occurrences of the word or phrase in the form.

add_filter( 'frm_filter_final_form', 'change_edit_label' );
function change_edit_label( $form ){
    $form = str_replace( 'Edit', 'Revise', $form );
    return $form;
}
  • Usage
  • Parameters
  • Examples
    • Use shortcode throughout HTML in form
    • Minimize the form without the shortcode
    • Change a word
Categories
×

Categories

  • Installation & Getting Started
  • Account Management
  • Forms
  • Entries
  • Views
  • Styles
  • Importing & Exporting
  • Add-Ons
  • Extend Formidable Forms
Install Formidable Lite

Using WordPress and want to get Formidable Forms for free?

This article may contain affiliate links. Once in a while, we earn commissions from those links. But we only recommend products we like, with or without commissions.

Take on bigger projects Right Now

Get the tools you need to revolutionize your workflow and architect a masterpiece. Build the most advanced WordPress forms and actually use the data you collect in meaningful ways.

Get the most advanced WordPress form plugin and the only form builder with integrated Views.

Get Formidable Forms Now

Resources

  • Community
  • Affiliates
  • Contact

Top Features

  • Front End Editor
  • Repeating Fields
  • Views from Entries
  • Calculator Forms
  • Conditional Logic
  • Visual Form Styler
  • Form Templates
  • User Submitted Posts
  • File Upload Forms
  • Spam Protection
  • Multi Page Forms
  • Surveys & Polls
  • Form Graphs & Charts
  • Save and Continue
  • Mobile Forms
  • Stripe Forms
  • PayPal Forms
  • WooCommerce Forms
  • MailChimp Forms
  • User Registration
  • Signature Forms
  • Bootstrap Forms
  • Quiz Maker
  • Zapier Forms
  • Salesforce Forms
  • HubSpot Forms
  • API Webhooks
  • Multilingual Forms
  • Directories

Company

  • About Us
  • Giving Back
  • Careers
  • Newsletter
  • Blog

Copyright © 2021 Strategy11, LLC. Formidable Forms® is a registered trademark Strategy11, LLC.
Privacy Policy | Terms of Service | Sitemap

Join 300,000+ using Formidable Forms to create form-focused solutions fast. Get Started