WordPress.org

Support

Support » How-To and Troubleshooting » Validating Post From Front End Form?

Validating Post From Front End Form?

  • http://pastebin.com/rw4c6jZQ
    Is a post from front end form I have.

    It works great really. Does everything I need it to. Except the actual ‘simple’ validation that starts on line 10

    If you google (or hit up stackexchange) for a post from front end tutorial, all the code is pretty much the same. And it all includes some form of that type of validation.

    On my form it doesn’t do a thing. Now the echo’s I wouldn’t necessarily expect to work, as I’m calling the script above the header. But the form submits regardless of whats filled out. I need to have the processing script up above the header for the redirect. If the redirect gets called after the header loads, I get errors….

    I’ve tried looking at various validation tutorials, but I’m not quite getting it. JS isn’t really the route I want to go. I’m mainly looking to keep the form from submitting without required fields. Proper error messages are a bonus!

    And good sources for info, or suggestions?

    TIA!

  • The topic ‘Validating Post From Front End Form?’ is closed to new replies.