Plugin Add Media Panel And Retrieving $_Post Data
-
I’m trying to write a custom Add Media panel, containing a form. The idea is that the user will click a new Add/Insert Media button, then fill in a form, and the data will be saved to a custom field of the current post, and optionally they will also be able to insert shortcode into the post content.
I have the form that loads into the Add Media iFrame set to post to itself (I think), and I’m attempting to retrieve the $_POST data from the form when the page reloads in its iFrame. However, I can’t seem to access any of the data I just posted. Anyone know why this might be? Maybe this is completely the wrong way to do this anyway. I kinda assumed that this was the easiest way to be able to write form values to the wp database, since you can’t call PHP scripts at runtime, but I could be completely wrong.
Could the problem be I’m using the wrong URL for the form action? This is the URL the form submits to currently:
<blog URL>/wp-admin/media-upload.php?post_id=9654&tab=ell_insert_gmap_tab&
(not sure where the extra ‘&’ comes from).Anyone any idea what I’m doing wrong?
a|x
- The topic ‘Plugin Add Media Panel And Retrieving $_Post Data’ is closed to new replies.