I created an edit custom form (of a node) via a custom module. From this form, I have a "managed file" field (for one picture) and I set his default value to a fid; However, when my form is rendered, the "managed file" field doesn't show the image ratached. I don't understand why
My code :
$form['project']['image'] = array(
'#type' => 'managed_file',
'#title' => t('Image'),
'#default_value' => 10, //Set 10 for the test, the fid "10" exist, I checked
);
My form rendered:
As you see, no image is loaded whereas the default_value is set to an existing fid (10)