1. Login to ADMIN FastGem in the instance you are editing. 
  2. Access the form you are adding this feature to
  3. Add the following fields: 
  • Hidden Field named ' photo_file_location' (No values needed) 
  •      

 

      

  • 'File Upload' field named, ' Photo '.  Caption should be: 'Your Photo' . Description: 'This photo will be used to verify your identity to prevent any fraudulent activity.' Once you've filled in this information, click on 'Attributes' tab. 
  •                

 

  • Attributes to 'File Upload' field should be added as shown in picture above.

 

 

  • Go into "Form Properties" > "Php Scripts" and paste the code below in the "Script called after form has been processed" box. Once you've completed these steps, click 'Save & Close'. 

 

       

 

Code to paste: 

try{
list($replace, $with) = RSFormProHelper::getReplacements($SubmissionId);
$uploadPath = str_replace($replace, $with, '{photo:path}');
$post['photo_file_location'] = preg_replace("/https:\/\/(.*?).fastgem.net\/tmp\//","",$uploadPath);
$directoryName = JPATH_ROOT . "/assets/submissions/";
if(!is_dir($directoryName)){
//Directory does not exist, so lets create it.
mkdir($directoryName, 0755);
}
rename(JPATH_ROOT . "/tmp/" . $post['photo_file_location'], $directoryName . $post['photo_file_location']);
}catch(Throwable $t){}
 
 
Go into FastGem > Config > Submission Data and add the following row with field details as listed below. Click 'Done' Then, 'Save' :
 
   
 
        
 
 
 
 
FIELD DETAILS: