Understanding Tags in Contact-Form-7

Contact Form 7 provides something call tags for the Form. Tags are small piece of string enclosed in a square brackets [], you can use them in your Mail fields for output. We will look at more details about Mail field in another tutorial.

Form-tag are something you use to build a form for your website. These Form-tag are replaced with HTML elements in the front-end of your Form.

// Form-tag
<label> Your Name
    [text your-name] </label>

// HTML Element
    Your Name
    <input name="your-name" type="text">

You can create these Form-tag using the Form-tag Generator


Form-tag syntax have four different components

  • Type
  • Name
  • Options
  • Values

Type defines what type of HTML element you need.

[text username id:foo class:bar placeholder "Your name"]

Name is to identify the input fields. This will display in the Mail tab which you can use it in your Mail fields to print it out. We will look at this in an another tutorial.

[text username id:foo class:bar placeholder "Your name"]

Options is for behavior and appearance. Ex: class and id are comes under options. Options are optional.

[text username id:foo class:bar placeholder "Your name"]

Values use to define values of the field.

[text username id:foo class:bar placeholder "Your name"]

GoodHelpful!Very Helpful!Awesome!!   Is the article helpful?
Copyright © 2006 - 2019 beekeepersblog. All rights reserved