• 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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter toneburst

    (@toneburst)

    Bump.
    Anyone?

    Thread Starter toneburst

    (@toneburst)

    OK, I guess Ajax/jQuery is the way to go here.

    Bump.

    I have the same exact question. I’ve added a custom tab to the Add Media iFrame, which displays a custom form. I submit the form to itself, and it simply reloads fresh; I cannot seem to catch any of the $_POST vars that were just submitted.

    Any tips or suggestions?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Plugin Add Media Panel And Retrieving $_Post Data’ is closed to new replies.