I&#39;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&#39;m using hook_form_alter to provide a custom validate handler, and in function &quot;XXX_validator($form, &amp;$form_state)&quot;, I&#39;m getting thumbnail picture of pdf by using &#39;convert()&#39;, and now I want to store it into my hidden field. But, I&#39;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(&#39;filepath&#39; =&gt; $targetFilePath,<br>                                &#39;filename&#39; =&gt; $tfName,<br>
                                &#39;filemime&#39; =&gt; file_get_mimetype($tfName))</b><br>Finally, I&#39;m using <b>form_set_value($form[&#39;field_project_thumb&#39;][0], $newVal, $form_state);<br><br></b>Which is not working. Please help<br>