Formidable Forms

Formidable Forms

  • Features
  • Pricing
  • Resources
    • Docs & Support
    • Blog
    • Community
  • Solutions
    • Web Applications
    • Calculators
    • Surveys
    • Directories
    • Payments
    • Contact forms
  • Login
  • Get Formidable Forms

Insert a Search Bar

Last Updated: April 28, 2020

Knowledge Base → Entries → Searching Entries → 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.

Formidable Forms is the best WordPress Form Builder plugin. Get it for free!

Use the shortcode builder

  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.

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" → "Form Styling" 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.

Related Hooks

  • Search for an entire string in the search bar with the frm_search_any_terms hook.

Related Topics

  • Create a Custom Search Form
  • Use the shortcode builder
  • Insert the shortcode manually
    • Parameters
  • Add Styling
    • Formidable Styling
    • Custom Styling
    • Browser Styling
  • PHP Alternative
  • Related Hooks
  • Related Topics
Categories
×

Categories

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

Using WordPress and want to get Formidable Forms for free?

Get Formidable Forms Lite Now

You do not have permission to view this form. Maybe you need to log in?

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
  • Free Online Form Builder

Top Features

  • Application Builder
  • Calculator Forms
  • Surveys & Polls
  • Quiz Maker
  • Form Templates
  • Application Templates
  • Directories
  • Donation Plugin

Company

  • About Us
  • Giving Back
  • Careers
  • Newsletter
  • WP Tasty
  • Nutrifox

Copyright © 2023 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 See User Reviews