Create a fixed floating form widget

February 2, 2019 by JetSloth

Want to be able to create a cool floating form widget on your site? This tutorial talks about how to do it without using a plugin.

HTML Markup

Add the below HTML markup to the page/post/ or global area in your theme. Tip, if you don’t have access to edit your theme PHP files, I suggest adding this markup in any global area across your website. Things like a footer widget or header widget will work well. Basically anywhere that appears on every page.

I’ve added my HTML to the bottom of this post within the WordPress text editor. See below.

Add CSS styles

Copy the below CSS styles and add them to your WordPress theme. If you don’t have access to your WordPress theme I suggest installing the Simple Custom CSS plugin and then copying the below CSS into the settings screen. This plugin will allow you to add custom CSS to your site.

Should look like this once done.

Add Javascript

Copy the below jQuery and add it into a HTML field within your contact form. See screenshot below.

Add the JS to a HTML field, should look like below.

The End Result

Take a look at the bottom right-hand side of this post, you should see a floating green mail icon, click that to see the form appear in the widget panel.

Show us your work & give us feedback

We’d love to see you try this on your own website! Even more, we’re potentially looking at turning this idea into a larger plugin that would be available on JetSloth. So with that in mind, we’d love to get your feedback on the idea, do you love it, hate it, or have some feature requests. Click the green icon example and leave us your feedback about this idea in the widget form on page.

If you´re not into coding yourself, check out Gravity Extend for extending Gravity Forms with fully functional add-ons.

 

  • Give us feedback

    Like this idea? Would you like to see it become our next plugin? Leave your feedback below!
  • By signing up to the mailing list, you'll get emails when we release new WordPress plugins, or notify you of major plugin updates. That's it, no spam ever.

  • This field is for validation purposes and should be left unchanged.