first off, there is duplicate code on the page that will cause issues.
change:
<?php
// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
'UploadFolder' => "uploads/",
'FileName' => "[FileName]",
'DefaultFileName' => "",
'ResizeType' => "0",
'ResizeWidth' => "0",
'ResizeHeight' => "0",
'ResizeFillColor' => "" );
// WA_UploadResult1_1 End
// WA_UploadResult1 Params End
?>
<?php?>
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if($_SERVER["REQUEST_METHOD"] == "POST"){
WA_DFP_UploadFiles("WA_UploadResult1", "UploadFile", "0", "", "false", $WA_UploadResult1_Params);
}
?>
<?php
// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
'UploadFolder' => "uploads/",
'FileName' => "".((isset($_POST[""]))?$_POST[""]:"") ."",
'DefaultFileName' => "",
'ResizeType' => "0",
'ResizeWidth' => "0",
'ResizeHeight' => "0",
'ResizeFillColor' => "" );
// WA_UploadResult1_1 End
// WA_UploadResult1 Params End
?>
to:
<?php
// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
'UploadFolder' => "uploads/",
'FileName' => "[FileName]",
'DefaultFileName' => "",
'ResizeType' => "0",
'ResizeWidth' => "0",
'ResizeHeight' => "0",
'ResizeFillColor' => "" );
// WA_UploadResult1_1 End
// WA_UploadResult1 Params End
?>
<?php?>
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if($_SERVER["REQUEST_METHOD"] == "POST"){
WA_DFP_UploadFiles("WA_UploadResult1", "UploadFile", "0", "", "false", $WA_UploadResult1_Params);
}
?>
second the Submited file option option only works if you do not use the Upload File behavior to upload the file to the server.
Where you are uploading the file, select the entered value option, then click the lightning bolt icon and select the WA Uploaded Files (UploadFile) -> Server Directory variable from the dynamic data bindings.
this will add code similar to:
<?php echo $WA_DFP_UploadStatus["WA_UploadResult1"]["serverDirectory"]; ?>
copy this, then click
the lightning bolt again, this time select the WA Uploaded Files (UploadFile) -> Server File Name variable from the dynamic data bindings.
you will now have code similar to:
<?php echo $WA_DFP_UploadStatus["WA_UploadResult1"]["serverFileName"]; ?>
paste the server directory code before that:
<?php echo $WA_DFP_UploadStatus["WA_UploadResult1"]["serverDirectory"]; ?><?php echo $WA_DFP_UploadStatus["WA_UploadResult1"]["serverFileName"]; ?>
and click ok.