coiai Logo

Customize Style Contact Form 7 on WordPress

What is this?

I’ve edited the CSS for Contact Form 7, a popular WordPress plugin for creating contact forms.

When implemented, it looks like this:


A small detail I focused on was adding an ease effect to the focus state.


How to Apply Styles to Contact Form 7

First, add Contact Form 7 as a new plugin.

Download Contact Form 7

Once installed and activated, you should see a new “Contact” item in the left sidebar of your WordPress dashboard. Click on it.


When you open it, you’ll likely see a form that has already been added. Open that form.


In the form editor, paste the following code (feel free to copy-paste):


The code is based on the classes and elements from the official Contact Form 7 site. I’ve styled it in a way that minimally changes the default settings upon installation.

<label class="form__label"> 企業名
    [text* your-name class:form__textInput autocomplete:name] </label>

<label class="form__label"> お名前
    [text* your-name class:form__textInput autocomplete:name] </label>

<label class="form__label"> メールアドレス
    [email* your-email class:form__textInput autocomplete:email] </label>


<label class="form__label"> お問い合わせ内容
    [textarea* your-message class:form__textInput] </label>

[submit "Submit"]

<style>
.form__container {
  max-width: 400px;
  margin:0 auto;
}

.form__label {
  display: block;
  margin-top:1.5em;
  color: gray;
  font-size: 0.8em;
}



.form__textInput {
  width: calc(100% - 2.4em);
  border: 1px #c0c0c0 solid;
  border-radius: 2px;
  padding: 1em 1.2em;
  color: 1e1e1f;
}

.form__textInput:focus {
  transition: .3s ease-out;
  outline: 1px skyblue solid;
}

.wpcf7-submit {
  display: block;
  color: white;
  background-color: black;
  padding: 0.8em 2em;
  border-radius: 4px;
  margin: 2em auto;
  border: none;
}

.wpcf7-submit:active {
  background-color: rgb(95, 95, 95);
  /* This style is created by https://coiai.boy.jp */
}
</style>


Once the form setup is complete, navigate to a static page where you want to add the form.


Here’s an example of how it looks when added.


I’ve kept the code minimal, avoiding unnecessary things like titles, background color settings, or size restrictions. Feel free to adjust it to suit your environment.

投稿日: 2024年9月13日
カテゴリ: WordPress
タグ: WordPress
coiai

coiai

この記事もおすすめ

ポッドキャストを取った後Auditionですべきこと

ポッドキャストを取った後Auditionですべきこと

この記事はポッドキャストなどの音声コンテンツを取った後にAuditionで編集する方法について解説しています。 環境 やること 基本的に以下の4つの工程をすると、かなりクオリティアップにつながります! ノイズリダクション 無音部分を選択します。開始地点をi, 終わりをo キーを押すと選択できます。選択できたらエフェクト→ノイズリダクション/リストア→ノイズプリントをキャプチャを押します。 続いて、全体を選択します。cmd, a で全選択になります。エフェクト→ノイズリダクション/リストア→ノイズリダクションを選択します。 以下のようなパネルが表示されうので、ノイズのみをきたりして、削減ちを調整して、良い感じになったら適応ボタンを押します。 シングルバンドコンプレッサ 左のパネルのエフェクトトラックから▶️ボタンを押し、振幅と圧縮→シングルバンドコンプレッッサを選択します。 選択すると下記のようなパネルが開きます。それぞれ、 といった意味があります。設定値は下記画像のようにしています。 設定がめんどくさい場合はプリセットからラジオレベラーを選択してください。 EQ(声をクリアにする) パラメトリックイコライザーを使用します。エフェクト→フィルターとイコライザ→パラメトリックイコライザーを選択します。 私の場合は下記のように設定しています。 無音カット エフェクト→診断→無音をカットをすると左パネルに診断が表示されます。 効果を無音を削除、プリセットをポッドキャストにするとちょうどよくなると思います。設定したら、スキャンボタンを教えて、全て削除で無音がカットされます。 かなりカットされてしまうので、短いCM等に使うのはありかなという感じです。 参考 Adobe 無音カット https://helpx.adobe.com/jp/audition/using/strip-silence.html

この記事を書いた会社

株式会社coiaiは、「想像できることを美しく実現」を掲げ、XR・Web・アプリ・システム開発およびDX支援を行う会社です。 創業2022年、東京都練馬区に本社を置き、要件のヒアリングからPoC(概念実証)、本番運用まで一貫して伴走します。 まずはお気軽にご相談ください。

商号株式会社 coiai創業2022年1月設立2025年1月23日資本金1,500,000円(設立時点)本社所在地東京都練馬区関町北 3-6-9代表者代表取締役 竹村 啓佑 / 代表取締役 服部 陽良

主なご相談内容

会社概要・役員紹介を見る

詳しい会社情報は会社概要ページでご覧いただけます。

資料請求・無料相談

導入要件のヒアリングからPoC、本番運用まで伴走します。まずはお気軽にご相談ください。

お問い合わせの前に 個人情報保護方針 をご確認ください。