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

jlnknz created an issue. See original summary.

jlnknz’s picture

Issue summary: View changes
jlnknz’s picture

Issue summary: View changes