0

I have a single page webform with a bunch of fields (text field, radio buttons, etc) that works fine. As soon as I add a file upload field it stops working:

  • when submitted, the form returns with all the fields still filled in
  • there are no validation messages of any kind

I've littered webform.module with lines of print statements and it appears that webform_client_form_validate and webform_client_form_submit are never called at all. I suspect some module may be altering my form because it picks up the file field somehow.

All webform related modules have been disabled.

I suspect I'm having a similar problem this question describes: Webform does not submit, instead redirects to self . The suggested solutions are rather vague though, and I'm not sure how to proceed.

1 Answer 1

-1

I discovered the issue: I had added a script to my theme to prevent double form submissions: a simple "if the submit button is clicked, disable submit buttons in the form" jquery script.

This script prevented the submit button of the field field from being activated at the same time the main submit button was pressed. This confused Drupal to a sufficient degree that nothing worked anymore.

I fixed it by wrapping the disabling of submit buttons in a window.setTimeout(function yada yada ... , 50).

1
  • -1 for the function( yada yada
    – DMAC
    Jul 28, 2015 at 15:19

Your Answer

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

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