File Size Validation/Error Message on Upload
I have a form with an upload file field. If the file is too large to be uploaded, the page refreshes after a submit button is pressed and the person has to start over. Is there a way that an error message can appear with the file limitations so, they don't lose all their data in the other form fields?
Here is my upload code:
// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
'UploadFolder' => "admin/received",
'FileName' => "[FileName]",
'DefaultFileName' => "",
'ResizeType' => "0",
'ResizeWidth' => "0",
'ResizeHeight' => "0",
'ResizeFillColor' => "" );
// WA_UploadResult1_1 End
// WA_UploadResult1 Params End
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if(isset($_POST["submit"]) || isset($_POST["submit_x"])){
WA_DFP_UploadFiles("WA_UploadResult1", "id_image", "2", "[NewFileName]_[Increment]", "false", $WA_UploadResult1_Params);
}