• Ok so usually I take submissions of data and use that to manually do a post. I use custom fields that plug into the post.php. My question is how I can set up a form that I can collect data to go into those custom areas.

    For example. I enter the title into the custom field in the posts admin and then it gets added to the post using this
    <h2><?php the_title() ?></h2>

    So how can I have that inputted by the user through the form so they can post themselves?

    Thanks!

Viewing 1 replies (of 1 total)
  • Plugin Author hoffcamp

    (@hoffcamp)

    There is an action hook described here in the faq that is run every time a form is submitted. You could use the wp_insert_post and add_post_meta to insert posts and add custom fields respectively, using the data from the form. The action is passed a parameter with the submission data keyed by nicknames if the items have them. I also have a template here (Custom submission behavior) that shows you how to hook into the form submission action. This way would bypass the normal ‘publish submissions as posts’ functionality.

    The alternative would be to make a custom summary template and set it as the ‘data summary template’ in the advanced tab. This would bypass all of the custom fields, though you could make the published post look however you wanted.

Viewing 1 replies (of 1 total)
  • The topic ‘Form submission posts.’ is closed to new replies.