managed_file type field for forms api
Hi,
I am creating a custom node type in which I need the user to upload image files. I found type "managed_file" to be the one to use but I can't seem to get it to actually upload the file on submit.
It comes with ajax but the file is never uploaded. Any ideas ?
$form['image1b'] = array(
'#title' => t("Put your first batch's second image to compare here"),
'#type' => 'managed_file',
'#required' => TRUE,
'#upload_location' => 'public://mymodulename',
'#description' => t('Here is where you can need to upload your image here'),
);
cheers,
Vishal
Hi Vishal,
Just in case you haven't seen these, these two videos will walk you through the steps needed to upload and save an a managed file. Let me know if these clarify the process:
Cheers,
Chris