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,
I fail to use the widget with in a custom module using the Form API. I have the following simple example:
function mymodule_menu()
{
// ...
$items['uploadtest'] = array(
'title' => 'Upload',
'page callback' => 'drupal_get_form',
'page arguments' => array('__my_form'),
'access callback' => TRUE
);
// ...
}
function __my_form($form, &$form_state)
{
$form['test'] = array(
'#type' => 'mfw_managed_file',
'#title' => t('Test'),
);
$form['send'] = array(
'#type' => 'submit',
'#value' => t('Send')
);
return $form;
}
But no file is submitted. If I click the "Upload" button next to the field, the progress indicator is displayed for a short time and then nothing happens. If I directly click "Send", then no file is transmitted at the submit function.
- Drupal 7.52 (with many other modules; I may test on a clean Drupal install if this is necessary)
- Multiupload Filefield Widget 7.x-dev (also tested with 7.x-1.13
Before investigating further, what may I be doing wrong?
Best,
Julien
Comments
Comment #2
jlnknz CreditAttribution: jlnknz commentedComment #3
jlnknz CreditAttribution: jlnknz commented