Docs & Support

Learn about all the Formidable features and get support from our amazing customer success team.

Insert a Search Bar

Use this shortcode to add a search bar to a page, post, widget, or View. This search bar will only search content within a View or entry list. Please note that this search bar will not search categories, taxonomies, or custom fields.

Use the shortcode builder

Add the shortcode in block editor

Follow this guide on adding the search shortcode to your posts and pages using the block editor.

  1. Go to a WordPress page or post.
  2. In the block editor, click the (+) add block button, scroll to the Widgets category, and search for the Shortcode block. Insert shortcode using block editor
  3. Insert the [frm-search] shortcode in the block. Add search shortcode using a block editor

Add the shortcode in classic editor

If you're still using the classic editor in WordPress, follow this guide on how to add the search shortcode to your posts and pages.

  1. Go to a WordPress page or post.
  2. Click on the Formidable button above the content box. Publish Form Add Form
  3. Click on the Search option and then select from the options below.Insert Search Shortcode Builder
  4. Click the Insert into Post button.

Formidable Forms makes advanced site building simple. Launch forms, directories, dashboards, and custom WordPress apps faster than ever before.

Insert the shortcode manually

Insert the following shortcode in the before content of a View or in a page/post that contains a View. This search form can also be used to search an entry list.

[frm-search]

If you would like to use this search form in a widget or on a different page from your View, use the following shortcode:

[frm-search post_id=x]

Replace 'x' with the ID of the page that contains your View.

Parameters

Optional

  • post_id - ID of the page or post where the View or entry list is published. Use this option if you would like the search bar on a different page from your View or entry list. Usage:
    [frm-search post_id=x]
  • label - Change the default label on the search button. Usage:
    [frm-search label="Search"]
  • views - Only search specific Views on the page. This is helpful if you have multiple Views on a page and you would like to search only some of those Views. Usage:
    [frm-search views="x,y,z"]

    Replace x, y, and z with View IDs.

Add Styling

Formidable Styling

If you would like to use Formidable styling for the Search button, insert this on your page:

<div class="with_frm_style"><div class="frm_submit">[frm-search]</div></div>

Also, make sure you have selected the option to Load Formidable Styling on every page of your site in your Formidable Global Settings.

Custom Styling

If you would like to change the styling of your search bar, you can add a couple of classes to your theme style.css or your Custom CSS on the Formidable → Global Settings → Custom CSS page. You could add something like this:

#frm_search
{width:60%;}
.searchsubmit
{width:20%;}

Making changes to #frm_search affects the input field and .searchsubmit affects the search button.

Browser Styling

Chrome and Safari will add their own styling to the search bar. If you want to "turn off" that styling and use your theme styling instead, add this CSS:

input[type=search]
{
   -webkit-appearance:textfield;
   -webkit-box-sizing:content-box;
}
input::-webkit-search-decoration,
input::-webkit-search-cancel-button 
{
   display: none;
}

PHP Alternative

FrmProEntriesController::get_search(array('post_id' => x));

Replace x with the ID of the page that contains your View.

Was this article helpful? *

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.

In this article

    We have a small, but amazing team of dedicated people who are committed to helping you achieve your goals and project requirements.


    Copyright © 2025 Strategy11, LLC. Formidable Forms® is a registered trademark Strategy11, LLC.

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