Wordpress Recaptcha use on form that created using page

邮差的信 提交于 2019-12-24 10:56:54

问题


I am trying to use a wordpress recaptcha plugin.

The plugin (like wp-recaptcah, better Wp recaptcha) that I am trying to use is only working for the comment form.

But in my case I have created a page and there I have inserted HTML that is managed from the admin panel.

I don't understand how I can use the plugin with my form.

I did not get any shortcode HTML tag to use it directly on the page.

Any suggestion how I can achieve this?

I have created a page in the admin panel and inserted this code. My form is submitted via AJAX:

<div class="First"> Here some static Html is used </div>

<form id="main-form">
    <div>
      <label>Name</label>
      <input class="span6" type="text" maxlength="45" name="name" />
    </div>
    <div>
      <label>Email</label>
      <input class="span6" type="text" maxlength="45" name="email" />
    </div>
    <div>
      <label>Phone Number</label>
      <input class="span6" type="text" name="phone" placeholder="Enter Phone Number" />
    </div>
    <div>
      <label>Message</label>
      <textarea class="span12" name="message" rows="6" ></textarea>
    </div>
    <div><button class="btn >Send Enquiry</button></div>
</form>

<div class="second">Here some static Html is used </div>

回答1:


Best suggestion: use Contact Form 7 and Contact Form 7 reCAPTCHA Extension or the Really Simple Captcha plugin, both work well with Contact Form 7.

You'll create the form on the CF7 admin page, then insert it into your WordPress page with a shortcode, which, for many reasons, is much better than writing the form itself in the WordPress text view.




回答2:


You may use reCAPTCHA Form . It give u a form along with the recaptcha. http://wordpress.org/plugins/recaptcha-form/

or else you may be wanting the following one instead, http://wordpress.org/plugins/wp-recaptcha/



来源:https://stackoverflow.com/questions/19405560/wordpress-recaptcha-use-on-form-that-created-using-page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!