Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
slashrsm CreditAttribution: slashrsm commentedHm... 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.