16 Replies to “Posting From the Front End – Form Validation (Reader Submission)”

  1. Thanks a lot ! Perfect timing for my new website !

    Please do an update in your older related (and obsolete) posts to add a link to this post ! It would have been helpful for me searching an up to date front-end form script/plugin…

    A french guy

  2. Hey Voodoo
    Thanks for putting this up… I hope it helps out your readers. Your series on posting from the front end was the best I found anywhere after very relentless searching so once again thanks so much for all your help.
    Take care

    1. And thank YOU for submitting this and helping out others searching for ways to pull this off! My series was the result of a LOT of wasted time at the Google machine. I am certain I read every available tutorial, or even tiniest relevant snippet of code to put everything together. Then, a lot of trial and error. It works really well, and I hope more people will work through this and offer further improvements.

  3. Hi! Cool tutorial thank you!
    Just one question if i want to add some allowed formats (for example flv, avi etc.) how could i do that?

  4. How i can add the imagen to the post? Because the image uploaded is not added to the wysiwyg editor of wordpress.

    And thanks for this useful post!

  5. I keep getting “Cannot modify header information – headers already sent by” etc. because if the user does not enter information in the form field boxes it echos the error message, which i guess it is not supposed to do before the header is sent via the redirect. Any ideas on how to stop this from happening?

  6. This is very helpful on my own project.

    I don’t think the hidden “action” field is needed; that’s purpose of the nonce (which is not even used here)– your initial IF statement can just check for existence of the nonce field and wp_verify_nonce as a condition to enter the rest of the code.

    For Carrie’s question, your code should not be even trying to create a post of there are errors (line 76). It is is possible for wp_insert is failing; all of the stuff done to save the post (starting line 90) should be wrapped in a if ( $post_id ) check– so it only tries to modify the post if was successful in creating one.

  7. HI Rev Voodoo,
    Your code has been a lifesaver for me. I just need to ask what should I do if I want to use the form for a custom post type(say “event”) instead of the regular WP posts. can you please let me know the extra lines that I need to write?

Leave a Reply