Last updated on July 8, 2024 by Kyle Cash

How To Edit a Contact Form in WordPress [Two Easy Methods!]

Discover how to edit a contact form in WordPress easily. Follow this detailed guide to customize, optimize, and troubleshoot your contact forms.

How to Change a WordPress Contact Form Style

Approximate read time: 6.5 minutes

A default WordPress form just looks...blah.

That's why knowing how to edit a contact form in WordPress is so important. Otherwise, a WordPress site gets a contact form that looks out of place and won't convert.

That's why this guide is here. This post will show you how to edit an existing contact form or a new one in WordPress in two ways: with code and without code.

So, let's start the tutorial.

Too long; Didn't read

  • A beautiful contact form is a must-have for any professional website. A boring, default form can make your website look bad and might discourage people from getting in touch.
  • There are two options to edit a WordPress contact form. Change the code in WordPress, or use a WordPress form builder with no code!
  • Formidable Forms is an awesome plugin for creating and styling contact forms. It's easy to use, with pre-made templates and lots of options to customize your form to match your website's look and feel.

How to change your WordPress contact form style

As I mentioned, there are two ways to edit a contact form:

  1. Edit the form's code in WordPress
  2. Use a WordPress form builder

Method 1: Edit the formโ€™s code in WordPress

I assume you already have a form built and want some type of form customization.

If not, you must create a form before editing any code. Once that's ready, we'll start.

Step 1: Get the ID or class of your form

To start, you need the ID or Class of the form.

An easy way to find it is by right-clicking the form and choosing Inspect.

The Inspect button is highlighted in a web menu

Here, you can see the form HTML within the theme. The Googleโ€™s Developer Tools sidebar will slide out, and you can view the different code sections for your form.

The most important thing is to find the area you want to customize and keep track of the ID or Class name. Youโ€™ll use this to make changes.

For example, if I wanted to change the background color of our Contact Us form template, I'd find the outermost piece of code. In this case, itโ€™s a div with the class api-form-box.

The Inspect panel in a web browser to analyze the HTML and CSS of a web page. Two red arrows point to pieces of code to highlight them.

We can even test what itโ€™d look like from this console. If I right-click the div and click Add Attribute, I can add a background color style.

A code example to change the background color of a contact form

Hit Enter, and it shows the changes in the window.

A contact form with a black background and white fields

But donโ€™t worry. Whenever the page is refreshed, the form returns to normal. Next, head into the WordPress admin to make the necessary CSS code changes.

Step 2: Change the CSS in your WordPress admin panel

In the WordPress sidebar on the left hand side, choose Appearance โ†’ Customize โ†’ Additional CSS to style the form.

The customize menu button in WordPress with a red circle around it to highlight it

Here is where you can enter the CSS classes for the form. For example, I decided to change a few things on the form, so here is the code I entered on the left side:

A CSS code box in WordPress with .api-form-box, .frm_button_submit, and .frm_submit classes

To tag a Class, you must include a . before the class name. For an ID, you put a #.

However, if youโ€™re using this method, I recommend learning more about CSS rules to understand your changes better.

For my example, itโ€™d break down like this:

  • .api-form-box is changing the background color to light blue
  • .frm-button-submit is changing the submit button background to yellow and the text to black
  • .frm-submit is centering the button in the form

With these changes, my form would look like this:

A contact us form with a light blue background and white fields

There are some disadvantages to this method, though. 

An update could break the formโ€™s design and require more work, which is time-consuming. If there are multiple contact forms, youโ€™ll have to edit the HTML code and add custom CSS to each one.

But if you want something more straightforward and unbreakable, we recommend the following method.

Method 2: Use a WordPress form builder

Coding is a skill that takes time to learn.

And many people donโ€™t have the time to learn. If thatโ€™s you, a form builder is your best option. I recommend is Formidable Forms.

Formidable Forms banner

Itโ€™s one of the best contact form plugins in WordPress, so building forms is simple and time-saving. That frees up time to dedicate to other areas of your website.

No coding, no hassle โ€” just easy form building.

Formidable's form styler gives you more power over the form's design. Customize fonts, sizes, colors, and more with a few button clicks.

Best of all, it's in the free version! But Formidable Forms Pro has even more great features:

So, once Formidable is installed and activated, you're ready to start.

Itโ€™s just three simple steps to style your form and make it live on your site:

Formidable Forms Free WordPress Plugin

Step 1: Create a form

To style a form, you need a form to style, right?

So, head to your WordPress admin and go to Formidable โ†’ Forms โ†’ Add New.

Choose one of our many pre-built templates (a premium feature) or a Blank Form. Next, give your form a name and click Create.

The plugin will take you to its drag-and-drop form builder, where you can easily edit your form.

Formidable Forms drag and drop form builder

You can add any form fields from the sidebar menu, customize the field labels, change the input type, and more.

If youโ€™re creating a simple contact form, itโ€™s best to add the following:

  • Text field for the visitorโ€™s name
  • Email address for a way to contact them
  • Paragraph for a message they want to add

Once the contact form is set up, click the Save button to save your changes.

Then, weโ€™ll head to the Style tab.

Formidable Style Tab

Step 2: Style the form

Under the Style tab, youโ€™ll see a few options.

You can choose one of our pre-made design templates to save you time (premium) or start designing your own.

To design your own, click the three dots in the top-right of the style box and click Edit. The Formidable Style is the default style in Formidable.

Formidable Style Templates

This will take you to our Formidable Style Designer, where you can customize your form.

You can change the size and color of your labels, input fields, font size, and background color, and even upload a background image!

Formidable Forms Visual Form Styler settings

The possibilities are endless for you and your beautiful contact form! Once you customize your form, click Update to save your changes.

Step 3: Display the form

Displaying your form is even easier than creating it.

First, go to the post or page where you want to display your form and add a new WordPress block. Next, search for the Formidable Forms block, add it, and select your form from the dropdown menu.

Formidable Forms block

Last, update your post or page, and your form will be live on your page!

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

Get spam protection for any contact form

Having the ability to style contact forms is something you need, not want.

This post taught you how to customize a contact form in WordPress so your form looks how you want. Whether you enter custom HTML, CSS, and more, or go with Formidable Forms. You wonโ€™t be disappointed.

But there are also spam issues. Whether you choose Cloudflare Turnstile or Google reCAPTCHA, one form builder makes adding a contact form easy and protects it from spam.

And that's Formidable Forms.

So, donโ€™t wait any longer. Grab the best form builder plugin now and get started designing your forms!

And join our community on Facebook, Twitter, and YouTube for great form tips and tricks!



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.

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