Michael Mallett
Michael Mallett

Reputation: 744

Adding form to Wordpress post-editor

I have a post type that lets people add an event, including the usual date, time, location fields that are added via custom meta boxes into an additional table

However, I have written a script that pulls in facebook event information from the event url, with the intention of populating the wordpress post editor fields with this information.

The problem is that this is a form, and cannot be added as a meta box, as it would create a form within a form. So what is there that I can use instead of creating a new meta box that will allow me to add this form to the post editor for this post type, preferably above the title?

Upvotes: 0

Views: 448

Answers (1)

Peter
Peter

Reputation: 1358

Is it crucial that this form you're creating be it's own form? If you're pulling in information from facebook, I'm assuming you want to save it somewhere in your DB when the post is saved, so why not just use the available post form, and save that data on post save?

If you absolutely have to have it be a separate form, you could try hooking in somewhere outside of the form (I can't think of a hook you could use off the top of my head, but if you need it, I could look), and then position with JS if necessary.

Upvotes: 1

Related Questions