• 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

    https://www.ads-software.com/plugins/contact-form-7/

  • The topic ‘Validate custom form’ is closed to new replies.