Hi
I am trying to show the thumbnail images in a custom form's edit mode. I followed the instructions in http://drupal.org/node/53621 though i have multiple images in the custom form which looks like
$form['pictureupload1'] = array(
'#type' => 'file',
'#title' => t('Upload Image 1'),
'#size' => 48,
'#description' => t('The Image 1 in the banner.'),
//'#required' => TRUE
);
$form['pictureupload2'] = array(
'#type' => 'file',
'#title' => t('Upload Image 2'),
'#size' => 48,
'#description' => t('The Image 2 in the banner.'),
//'#required' => TRUE
);
.......................
.......................
I also tried with
function mymodule_update(&$node) {
if(function_exists('image_prepare') && function_exists('image_update')){
image_prepare($node, 'pictureupload1');
image_update($node);
image_prepare($node, 'pictureupload2');
image_update($node);
.................
.................
}
}
function mymodule_insert(&$node) {
if(function_exists('image_prepare') && function_exists('image_insert')){
image_prepare($node, 'pictureupload1');
image_insert($node);
image_prepare($node, 'pictureupload2');
image_insert($node);
.................
.................
}
}
function news_load(&$node) {
image_load($node);
........................
}
Theres no error messages, but the images are not uploaded and are not shown in the edit mode? What am i missing? U can find full codes in the attachment section.
Any solution will be nicely appreciated
DJ