Daniel Joseph
Daniel Joseph

Reputation: 69

Contact Form 7 Issue

I tested the contact form on my website and it doesn't work. On the back end, it tells my I have the following issue "Unavailable names (name) are used for form controls." I couldn't figure out how to solve it after looking at their FAQs. My website address is www.garagedoormadisonwi.com and the code for my contact form is:

<div class="our-form">
<div class="row">
    <div class="col-sm-6 col-md-6">
        <div class="form-group">
            [text* name class:form-control placeholder "Name"]
            <div class="input-bottom-line"></div>
        </div>
    </div>
    <div class="col-md-6 col-sm-6">
        <div class="form-group">
            [email* email class:form-control placeholder "Eamil"]
            <div class="input-bottom-line"></div>
        </div>
    </div>
</div>
<div class="row">
    <div class="col-md-6 col-sm-6">
        <div class="form-group">
            [text* address class:form-control placeholder "Address"]
            <div class="input-bottom-line"></div>
        </div>
    </div>
    <div class="col-md-6 col-sm-6">
        <div class="form-group">
            [tel* phone class:form-control placeholder "Phone"]
            <div class="input-bottom-line"></div>
        </div>
    </div>
</div>
<div class="row">
    <div class="col-sm-12 col-md-12">
        <div class="form-group">
            [textarea message class:form-control placeholder "Message"]
            <div class="input-bottom-line"></div>
        </div>
    </div>
</div>
<button type="submit" class="red-button bgcolor">
    [submit "submit"]
</button>

I'd appreciate if you can help me change it so it works.

Thank you in advance!

Upvotes: 1

Views: 1500

Answers (1)

user5341580
user5341580

Reputation:

Let's consider the error message you provide:

"Unavailable names (name) are used for form controls."

It cleary tells us that there's something wrong with your form controls (i.e. input field) naming. Next step is to look how you've named those element.

What I would assume is that the problem appear due to simplictic naming convention you're using for your form elements. Quick search through CF7 documentation gives us a possible solution:

The followings are parameter names that WordPress uses in a query: m, p, posts, w, cat, withcomments, withoutcomments, s, search, exact, sentence, calendar, page, paged, more, tb, pb, author, order, orderby, year, monthnum, day, hour, minute, second, name, category_name, tag, feed, author_name, static, pagename, page_id, error, attachment, attachment_id, subpost, subpost_id, preview, robots, taxonomy, term, cpage, post_type, and embed.

Soure: https://contactform7.com/faq/are-there-any-reserved-or-unavailable-words-for-the-name-of-an-input-field/

You can see that you cannot name your input control as "name".

Upvotes: 1

Related Questions