In the Jobs Posting with Easy Content Types and Gravity Forms tutorial, we used Gravity Forms to create a submission form for users to post their job openings. In this tutorial, we are going to create our own custom submission form. While we will focus the form around job submission, the techniques used here apply to all post/page/custom post type front end submission forms.
The process for creating a front-end submission form for posts, pages, or custom post types is actually quite simple, even though it is often thought of as being very difficult. There are just two major components to a front-end submission form:
- An HTML form for the data to be entered into
- A function that listens for the form submission and then processes the submitted data
The code written in the video, which consists of just two functions, is less than 80 lines and contains everything needed for a pretty decent front-end submission form, even if it is pretty basic. It introduces everything you need to know for getting started with building these kinds of forms and opens up the door to countless possibilities.
You must be logged in and have an active premium membership to view the rest of this content. Register or login from the sidebar.

great tutorial, thanks!
I didn’t think it was as simple as that. thanks for showing how to pass the parameters between pages too, that will be useful.
any plans for a server side validation tutorial?
Thanks! I will definitely plan on doing some server side validation at some point.
great tutorial, thanks!
I didn’t think it was as simple as that. thanks for showing how to pass the parameters between pages too, that will be useful.
any plans for a server side validation tutorial?
would be cool to enable AJAX too
Ajax would be good too
So I did it!
http://www.mywpacademy.com/wordpress-content-management-system-expert-trainer-washington-dc-va-md/project-listing/
But after building a very complicated front-end edit form – I am thinking that I can use the same custom form for the initial entry as well…
Good info though!
-iryna
Great job!
Great work, love the site.
I’m from the UK so no point me joining but would love to know what was involved in the way you setup an events calendar looking so good and also the sumbmission.
Why does being from UK make it so there is no point in signing up? I’m not trying to tell you to signup, I’m just curious about your logic
Can you tell me what you are looking at for the events calendar?
Hi there Pippin, slight confusion here I have caused.
I was referring to the signing up of mywpacademy which has a lot of usa based courses.
No problem joining your site, still studying what’s already available on your site. I’ve learnt a lot from your site already about gravity forms which could get me half way there.
I like the way the calendar has all these custom search options. http://www.mywpacademy.com/washington-dc-wordpress-web-development-events-calendar/#.T93ck1LNlIY
I’ve always wanted to find a way to create an events website for my local area but I’m not a programmer and dedicated scripts I have seen don’t do what is need so I would prefer to find a way using wordpress.
The calendar setup is good and so is the open form for submissions.
Ah, makes much more sense now
Your best bet is to go with a plugin like this one: http://tri.be/wordpress-events-calendar/
They have a free and pro version.
Does wp_nonce_field and wp_verify_nonce work on multisite?
For instance, if I have a form on a “child site” and need to submit it so the data will be collected in the parent site, will wp_nonce_field and wp_verify_nonce work, as the child site and parent site are on the same database? Or would there be some other solution to securely capture data from a child site and store it in the parent site?
What about using wp_nonce_field and wp_verify_nonce on separate sites on the same server?
For instance Site A has a form that will collect data and store it in Site B. Both sites are on the same server, but are different wordpress installations. Is there a way to securely pass the data from a form on Site A, and have it collected in the database of Site B?
Hmm, that’s a really good question. I think it will work, but really couldn’t say without trying it.
For passing data back and forth between sites, you should look at the switch_to_blog() and restore_current_blog() functions. They are extremely simple to use, but very cool.
thanks a lot
Would love to read this. Site tells me to register first. So I do. Come back, site tells me to log in. So I do. I’m now logged in, and the post says I can’t read the rest until I log in.
Hopefully the code in the tutorial works better than this.
This is a premium tutorial. You have registered for a free account. If you want to access this tutorial, you must upgrade to a paid account.
great tutorial.
pippin, is there a way to use akismet to filter spam for email input and description (content) input ?
No, not that I’m aware of. The best thing to do, probably, would be to enable reCaptcha or add in a simple math verification system.
thanks.
i hate captcha
i think it’s possible, but haven’t try it yet.
just incase someone else find this interesting:
i found a tuts http://andrewbleakley.com/protecting-your-contact-form-from-spam/
and contact form 7 have this feature too,
http://contactform7.com/spam-filtering-with-akismet/
I should rephrase my answer to say Im’ sure it’s possible, I just have no idea how to do it
This is a great tutorial! Thanks alot!
Also, be able to create posts is amazing for the front end, but what about moving a post to the Trash, how would we go about doing that?
You can use wp_delete_post() to remove a post (or place it in the trash).
Yeahh, I’ve seen that but the tricky part is how to get it to run for when you click on a href link, because I have a list of all posts in 1 loop, and lets say for example you wish to delete the 3rd post within the list, but that function just deletes all posts when used within the loop.
Use add_query_arg() and then attach a function to the “init” hook that watches for the query args.
You could also use:
get delete post link