hi all

we found out that if you have a on a form a managed_file and a plupload field the submit handler of the form are not called after submit the form.
put this on your form and put a drupal_set_message on the _submit of the form, you never wil se it :)

  $form['image'] = array(
    '#type' => 'managed_file',
    '#title' => t('Upload image'),
    '#progress_message' => t('Please wait...'),
    '#progress_indicator' => 'bar',
    '#upload_location' => 'public://images',
    '#upload_validators' => array('file_validate_extensions' => array('png jpg jpeg')),
   );


  $form['pud'] = array(
    '#type' => 'plupload',
    '#title' => t('Upload files'),
    '#description' => t('This multi-upload widget uses Plupload library.'),
    '#upload_validators' => array(
      'file_validate_extensions' => array('jpg jpeg png'),
    ),
    '#plupload_settings' => array(
      'runtimes' => 'html5,html4',
      'chunk_size' => '1mb',
    ),
  );

Comments

slashrsm’s picture

Status: Active » Closed (cannot reproduce)

Hm... it seems to work just fine. It must be something else in your form. AFAIK this happens if you define custom submit callbacks in #submit.