I'm having a form having 2 field, both files, but one hidden, one is visible.<br><br>User is allowed to upload a pdf file.<br><br>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.<br>
<br>Brief information about fields: <br><b>field_computed_name</b> is the name of hidden field which I want to set.<br>I computed <b>$newVal = array('filepath' => $targetFilePath,<br> 'filename' => $tfName,<br>
'filemime' => file_get_mimetype($tfName))</b><br>Finally, I'm using <b>form_set_value($form['field_project_thumb'][0], $newVal, $form_state);<br><br></b>Which is not working. Please help<br>