There is a way to eliminate the "Upload" button in Webforms, just adding an "attach" button that uploads the file automatically when you push "send", like in the image.enter image description here

1 Answer 1


First, it's worth to remember that file will be uploaded when you push form's submit button, if user haven't uploaded it yet.

Second, you could use AutoUpload module:

AutoUpload is a user interface (UI) enhancement that initiates automatic upload of files minimizing the number of clicks required by a user.

Currently, users must select files, then press the "Upload" button. We found users often don't realize a button press is necessary and mistakenly think their image is uploaded when it's not.

This module removes the extra button press and hides the "Upload" button via JavaScript for a quicker, automatic file upload. When JavaScript is not enabled, it falls back to the "Upload" button.

I must admit that this module conflicted with my custom modules and themes, but as a code sample it was perfect. It's GPL, so tailoring it to your custom needs is perfectly legal.

  • So if I hide the rest of elements with css and I only show the "Browse" button, when the user will submit it, it will work? (Thanks) Feb 12, 2014 at 10:03
  • @capitanmelao Worked for me with 7.20 and Form API forms all right. Your specific mileage may vary, but as far as I know it should work. Please test, and if it'll fail feel free to comment and request update on this answer :) Anyway I highly recommend AutoUpload - it makes things faster, browser uploads things while user is still editing other fields, so it does not need to upload anything big when user finished -> Less time from submit click to result page.
    – Mołot
    Feb 12, 2014 at 10:04
  • Thank you! I´m hiding now the elements, now.. AutoUpload could be integrate in my content type Webform? (Anyway I will try all of this, I will let you now, thank you very much!) Feb 12, 2014 at 10:11
  • Will it support Webform ?
    – Bala
    Feb 12, 2014 at 10:52
  • @Bala it integrates with managed file widget at Form API level, so unless Webform integrates with it in a conflicting way, it will. See my last sentence.
    – Mołot
    Feb 12, 2014 at 10:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.