2014-02-14 30 views
0

我使用WP-reCAPTCHA插件,現在我想在我的自定義表單補充一點:如何在Wordpress中使用我的自定義郵件表單中的插件添加驗證碼?

<form>  
    <div class="span3 form_fields"><input type="text" name="fname" id="fname" placeholder="First Name (required)" class="span3"/></div> 
    <div class="span3 form_fields"><input type="text" name="lname" id="lname" placeholder="Last Name (required)" class="span3"/></div> 
    <div class="span3 form_fields"><input type="text" name="phone" id="phone" placeholder="Phone Number (required)" class="span3"/></div> 
    <div class="span3 form_fields"><input type="text" name="company" id="company" placeholder="Company/ Institute Name (required)" class="span3"/></div> 
    <div class="span3 form_fields"><input type="text" name="email" id="email" placeholder="Email (required)" class="span3"/></div> 
    <div class="span3 form_fields"><select style="width:100%!important;" name="country" id="country"> 
      <option value="">Select country</option> 
      <option value="India">India</option> 
      <option value="USA">USA</option> 
     </select> 
    </div> 
    <div class="span6 form_fields"><textarea placeholder="Message (required)" name="message" id="message" class="span6"/></textarea></div> 
    <div class="clearfix"></div> 

    //here i want to add captcha  

    <div><button type="button" class="btn btn-inverse" id="submit" onclick="contactsales();">Submit</button></div> 
</form> 

請幫我找出簡單的解決方案?

+0

我會試試謝謝.. :) –

回答

0
<form action="" method="post"> 
.... existing form data here .... 
    <?php 
      // display the re-captcha box if re-captcha is installed: 
      if(function_exists('display_recaptcha')){ 
       display_recaptcha(); 
      } 
     ?> 
</form> 
相關問題