• 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 8 years, 1 month ago by jlarysz.
    • This topic was modified 8 years, 1 month ago by jlarysz.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter jlarysz

    (@jlarysz)

    I have worked around the problem by using user attributes in wfu form 1, leaving only the submit button in form 3. It’s good enough, but I would like to understand the problem better.

    Plugin Author nickboss

    (@nickboss)

    Can you please send me a screenshot of the page that you are redirected (at [email protected])? Maybe the shortcode edit button is pressed when you submit the form (because maybe it overlaps with the Submit button) and redirects you to the visual editor of the plugin.

    I cannot think of something else.

    Nickolas

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Two instances of wp-file-upload causing redirects’ is closed to new replies.