• I have a form that works just fine outside of WordPress, but am having trouble porting it into WP. Here is the code:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    I know the form is hitting the processing because the reCaptcha works. If you do the reCaptcha, it then says there is not a valid email address–even if there one. If you disable the validation for the email address, it says that the name field is empty–even it it isn’t. You can see what I’m working with here:

    https://www.enviromedia.com/beta/contact/

    I don’t want to re-write the form because I know it works. I want to know why it doesn’t work in WP.

    I should add that I am using WP-Exec or Exec WP (I can’t remember which), so the PHP is being processed.

    Thanks in advance for any help.

    Lisa

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter cowanservices

    (@cowanservices)

    Here is the code via Pastebin. Sorry, I didn’t know the rule.

    Lisa

    https://wordpress.pastebin.com/eZM0hPnz

    Try adding the code to a custom page template.

    Thread Starter cowanservices

    (@cowanservices)

    Thanks for the answer Esmi.

    I’m already using a template for the layout and a page for the content. Should I put all of the content into the template? I’m not quite clear on what you are suggesting.

    Lisa

    I’m suggesting that you add the form code to the custom template. You can still add content via Add/Edit Page as long as your template file still contains the Loop.

    Thread Starter cowanservices

    (@cowanservices)

    Thanks.

    I followed your suggestion and created a template with the form processing in it, however, when I stuck the wordpress loop in the page, it broke completely. Without the loop, you can still submit the form and get the same error messages.

    You can see the errors here:

    https://www.enviromedia.com/beta/contact-us/

    Thanks,
    Lisa

    I’m getting a blank page on a form submission, so perhaps there’s an issue in your form script.

    Thread Starter cowanservices

    (@cowanservices)

    That’s odd. I’m not getting a blank page, the form just doesn’t work. Now I can’t get past the reCaptcha. Any other ideas?

    Thanks,
    Lisa

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Form Won’t Validate in WordPress’ is closed to new replies.