Quantcast
Channel: WordPress.org Forums » [Contact Form 7] Support
Viewing all articles
Browse latest Browse all 49500

isaki on "[Plugin: Contact Form 7] Validate custom form"

$
0
0

Hi,
Is there a way to validate a custom form/your own html code ?

Short explanation what I have done:
With the help of the plugin 'Shortcode Exec PHP' and the ability to execute shortcodes in contact-form-7 I have built a function that take a GET-variable and draw up the html inside the form.

So the only code I have put in the contact-form-7 form-builder is:

[getallnames][/getallnames] <-- The PHP function shortcode

[hidden step "1-2"]
<p>[submit "Next"]</p>

The PHP-function draw something like this:
<span class="wpcf7-form-control-wrap first-name"><input type="text" name="first-name" value="" size="40" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required" id="fName" aria-required="true" placeholder="First Name"></span>

(of course the id is uniqe when I iterate and draw up the html)

The problem is that the above isn't validated and sends even if it is empty.
Any one got any god idea ?

Regards

http://wordpress.org/plugins/contact-form-7/


Viewing all articles
Browse latest Browse all 49500

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>