• Skip to main content
  • Skip to primary sidebar

Victor Font Consulting Group, LLC

The DEX Intranet Specialists

  • Home
  • Care Plans
    • Care Articles
    • Optional Subscriptions
  • Consultations
  • Products
    • Code Snippets
    • Public GitHub Repositories
    • Gist Snippets
    • Pastebin Snippets (Free)
    • Free Plugins
  • FAQs
  • Support
    • Graphic Design
  • Contact
    • Speakers
    • Portfolio
  • Resources
    • Free WordPress Video Training
    • Tutorials
    • Articles
    • Cybersecurity
    • EU Referral Network

Show Formidable Pro Checkbox Tooltips

July 31, 2014 By Victor M. Font Jr.

Formidable Pro Logo

Formidable Pro is a great tool for building any kind of form to use in WordPress. Forms can be very simple or extremely complex. Strategy 11 has built many useful hooks into the tool to allow developers to extend the plugins capabilities. For example, take a look at the following form.

Tootip Demo

Hover over any checkbox to see the tooltip.

Sending

This is a standard form built with Formidable Pro. The submit button is hidden to prevent anyone from clicking it. Hover your mouse over any of the checkboxes (not the label) and a tooltip will popup explaining what each checkbox means.

This often desirable feature is amazingly simple to implement in Formidable Pro using jQuery's built-in Tooltip Widget. The Tooltip Widget is included and preregistered in the WordPress distribution. To initialize the Tooltip Widget, first enqueue the script in functions.php the add the following code to your form's After Fields box in the Customize HTML section.

By default, the Tooltip Widget displays whatever content you have in a fields title attribute. Formidable Pro does not give us a method for specifying a field's title attribute. To create the actual Tooltips, we need to add a title attribute to the field with jQuery. But first, we need to retrieve the target field's ID#. From the form's build menu, click on the checkbox to reveal the ID#.

checkbox-id-number

Once you know the checkbox ID number, you can create the Tooltips. The field ID# for the “Specify Ethnicity" checkboxes is 1198. If you view the source code for this page, you'll see that each individual checkbox is identified as field_1198-0, field_1198-1, and so on. To create a title for the field, we hook into the document ready function and assign text to the title using the following syntax:

The following code, also added to the After Fields box on the Customize HTML menu, creates the tooltips seen on this page.

This version of the sample script works for Formidable Pro Version 1.7.11 and earlier:

With the release of Formidable Pro Version 2.x and higher, the development team made some internal changes to the way checkboxes, radio buttons, and scale fields are rendered in the html. Rather than use field ID in the naming convention, Formidable Pro now uses the field key. This results in greater consistency across the platform but requires an update to your custom jQuery as seen below:

Formidable Pro field key

To have the same styling✝ you see in these tooltips, add the following to your theme's style.css:

This is just a simple example that can be applied to any field on your form. As always, if you have trouble, please feel free to Contact Us.

 

✝If you have more than one plugin that loads a jQuery UI theme, make sure you turn off all but one. For example on this site, Formidable Pro loads the jQuery UI theme selected for the date picker and the Squelch Tabs and Accordions plugin also loads a jQuery UI theme. To get these tooltips to work properly, I disabled the Squelch Tabs and Accordions jQuery UI theme and only use the one that Formidable Pro loads. Load more than one theme and you will create a conflict that is difficult to troubleshoot.

  • 0shares
  • Facebook0
  • Twitter0
  • Pinterest0
  • LinkedIn0
  • Print
  • SMS0

Filed Under: Code Snippet, Formidable Forms, How To, Programming, Tutorial Tagged With: Code Snippet, Formidable Forms, How To, Programming, Tutorial

About Victor M. Font Jr.

Victor M. Font Jr. is an award winning author, entrepreneur, and Senior IT Executive. A Founding Board Member of the North Carolina Executive Roundtable, he has served on the Board of Advisors, of the North Carolina Technology Association, the International Institute of Business Analysis, Association of Information Technology Professionals, Toastmasters International, and the North Carolina Commission for Mental Health, Developmental Disabilities, and Substance Abuse Services. He is author of several books including The Ultimate Guide to the SDLC and Winning With WordPress Basics, and Cybersecurity.

Primary Sidebar

Shopping Cart

Books

  • Ultimate Guide to the SDLC front cover The Ultimate Guide to the SDLC
    Rated 5.00 out of 5
    $74.95
  • Winning With WordPress Basics 2nd Edition Winning With WordPress Basics 2nd Edition $19.95

Recent Articles

  • Modern Scam Defense: How Consumers and Businesses Can Recognize and Stop Email, Phone, and Text Fraud
  • How to Write a PRD So Dense It’s Technically a Novel
  • Top 5 Plugin Names That Scare Our Legal Department
  • When Agile Meets Our 3-Year Waterfall Roadmap: A Love Story
  • Why Our Enterprise Needs 27 Stakeholders to Approve a Button Color Change

Top 10 Article Categories

Best Practice Code Snippet Computers and Internet Genesis How To Leadership Programming Servant Leadership Tutorial WordPress

 
We only use analytical cookies on our website that allow us to recognize and count the number of visitors, but they do not identify you individually. They help us to improve the way our website works. By clicking Accept you, agree to cookies being used in accordance with our Cookie Policy.