2017-04-02 9 views
-2

フォームフィールドにclass:requiredを使用していますが、検証が機能していません。WordPressお問い合わせフォーム7の検証が機能しない

<div class="request-form animation" data-animation="fadeInRight"> 
    <h4>REQUEST AN ESTIMATE</h4> 
    <div style="margin-bottom: 18px">Our estimates are free, professional and fair. Most estimates require a site visit. </div> 
    [text Full Name class:input-custom class:input-full placeholder class:required "Name:"] 
    [text Phone class:input-custom class:input-full placeholder class:required "Phone:"] 
    [text E-mail class:input-custom class:input-full placeholder class:required "Email:"] 
    [textarea Message class:input-custom class:input-full placeholder class:required "Message:"] 
    [submit class:btn class:btn-light "SEND MESSAGE"] 
</div> 

答えて

0

入力の後に*を追加することになります。

CF7で必要なフォームフィールドを作成するには、入力の後に*を追加する必要があります。例えば、 。

[text* Full Name class:your-class placeholder "Name"] 

それでは、以下

<div class="request-form animation" data-animation="fadeInRight"> 
    <h4>REQUEST AN ESTIMATE</h4> 
    <div style="margin-bottom: 18px">Our estimates are free, professional and fair. Most estimates require a site visit. </div> 
    [text* Full Name class:input-custom class:input-full placeholder "Name:"] 
    [text* Phone class:input-custom class:input-full placeholder "Phone:"] 
    [text* E-mail class:input-custom class:input-full placeholder "Email:"] 
    [textarea* Message class:input-custom class:input-full placeholder "Message:"] 
[submit class:btn class:btn-light "SEND MESSAGE"] 

を使用してコードを置き換えます
関連する問題