Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 82367

Two instances of wp-file-upload causing redirects

$
0
0

Replies: 0

My challenge is to upload a matched pair of files and two additional data fields, all information then being recorded in a database. This is an admin page that is built programmatically on-the-fly.

I have set up a page with 3 forms. The first two are wp-file-upload shortcodes with the upload buttons hidden (opacity=0). The third form offers the two input fields and a submit button.The submit button triggers the two file uploads through a javascript call (elem.onlclick.apply(elem) for each file upload button), and then submits the third form with a .submit() call.

The problem is that when I have 2 wfu shortcodes in the form, and click in the third form then I get an immediately redirect to the wfu Upload Control Panel page.If I comment out either one of the shortcodes this doesn’t happen.

Both shortcodes look like this except the second has a different uploadid value.

<div class="rsi_upload_cell"> <?php echo do_shortcode('[wordpress_file_upload uploadid=1 uploadpath="uploads/ASNYjournals" uploadtitle="Locate Journal in PDF Format" uploadpatterns="*.pdf, *.PDF"] '); ?> </div>

I’m doing something wrong. What is it?

  • This topic was modified 16 minutes ago by  jlarysz.
  • This topic was modified 15 minutes ago by  jlarysz.

Viewing all articles
Browse latest Browse all 82367

Trending Articles