Hello everybody,

I'm sorry if I'm asking for something obvious, but I spent the last couple of days for a solution and I'm already wading knee-deep through the Drupal forms.inc code, without finding the answers to my problem.

I'm building a website with the Drupal 5.x-series. As part of it, I want to let my users upload their own photo's of events. As these usually will be dozens of photos, I want to integrate a Flash-based multiple file upload solution (SWFUpload, not the module) in the relevant photo upload form (Acidfree module). The SWFUpload-object works by letting you select multiple photos, and then serially making a background call for each of them to the submit URL in the background.

Setting this up is failry straightforward. The problem however is that Drupal regards these requests as not-submitted and therefore never executes the _submit function associated with the form, although the _validate function is neatly executed. So I'm wondering; is there any way to convince Drupal to process the form as if it was submitted?

Thanks,
Pieter

Comments

Mr. Pi’s picture

I think I finally figured out how to do this, although I'm not sure if it is sensible and safe.

In your _validate function, just put the following two lines (after doing the proper validation, of course):
global $form_submitted;
$form_submitted = TRUE;

Now, Drupal regards the form as submitted.

criznach’s picture