I've added a multiple image field to the user account that uses the multiupload_imagefield_widget
and it works when I edit the account.
On the other hand, I have a custom module with a form that I would like to edit just this field (I have a submit handler to update the user data). I call user_load
to display the data and I can see the data is there in the debugger, but no images are displayed on the form.
What do I have to do to make them show up?
Here's my code:
$user_data = user_load($user->uid);
$form['my_imageGallery'] = array(
'#type' => 'image',
'#title' => t('Image Gallery'),
'#default_value' => isset($user_data->field_galeria) ? $user_data->field_galeria : null,
'#upload_location' => 'public://user_galleries/',
'#upload_validators' => array('file_validate_extensions' => array('png jpg gif')),
);