Processmaker getField javascript error
<p>I have a problem when creating a process maker dynaform in which in task 1, a form uploads a document, in form 2 i want a link to that document to be able to download it (this is for testing purposes for the company I work for).</p>

<p>My problem is that following the documentation on the process maker website <a href="http://wiki.processmaker.com/index.php/Input_Documents#Links_to_Input_Documents_in_DynaForms" rel="nofollow">Links to input Documents in Dnyaforms</a> it doesn't work.</p>

<p>Enabling debug mode on the trigger, the URL is coming out fine, all ID's being referenced are fine, the only problem I can find is the getField function is returning null, where it should be returning an object where I can call its .value property.</p>

<p>Has anyone had this issue before? or am I just doing something stupid?</p>

<p>Trigger code:</p>

<pre><code>$caseId = @@APPLICATION;
$query = "SELECT C.CON_ID, C.CON_VALUE FROM APP_DOCUMENT AD, CONTENT C
   WHERE AD.APP_UID='$caseId' AND AD.APP_DOC_TYPE='INPUT' AND AD.APP_DOC_STATUS='ACTIVE'
   AND AD.APP_DOC_UID=C.CON_ID AND C.CON_CATEGORY='APP_DOC_FILENAME' AND C.CON_VALUE&lt;&gt;''";
$result = executeQuery($query);
if (is_array($result) and count($result) &gt; 0) {
   $caseDocId = $result[1]['CON_ID'];
   @@inputFileURL = 'http://' . $_SERVER['HTTP_HOST'] . '/sys' . @@SYS_SYS . '/' . 
      @@SYS_LANG . '/' . @@SYS_SKIN . '/cases/cases_ShowDocument?a=' . $caseDocId;
   @@inputFilename = $result[1]['CON_VALUE'];
}
</code></pre>

<p>Javascript code:</p>

<pre><code>window.onload = function() 
  { 
    getField("lnkTimesheet").href = getField("inputFileURL").value; 
  };
</code></pre>
