Two instances of wp-file-upload causing redirects
-
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?
- The topic ‘Two instances of wp-file-upload causing redirects’ is closed to new replies.