[support] form_set_value help
Gorav Singal
techie07 at gmail.com
Sun Nov 15 13:37:29 UTC 2009
I'm having a form having 2 field, both files, but one hidden, one is
visible.
User is allowed to upload a pdf file.
I'm using hook_form_alter to provide a custom validate handler, and in
function "XXX_validator($form, &$form_state)", I'm getting thumbnail picture
of pdf by using 'convert()', and now I want to store it into my hidden
field. But, I'm not able to set it.
Brief information about fields:
*field_computed_name* is the name of hidden field which I want to set.
I computed *$newVal = array('filepath' => $targetFilePath,
'filename' => $tfName,
'filemime' => file_get_mimetype($tfName))*
Finally, I'm using *form_set_value($form['field_project_thumb'][0], $newVal,
$form_state);
*Which is not working. Please help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20091115/21fde17a/attachment.html
More information about the support
mailing list