I want to drag the file to the drop zone once file dropped in the dropzone then it must be attach with HTML file upload control. And upload the file on the click of submit button.
<form name="form1" method="post" enctype="multipart/form-data" action="index.php">
<div id="dropContainer" style="border:1px solid black;height:100px;width:100px;">
Drop Here
</div>
Should update here: <input type="file" name="fileInput" id="fileInput" />
<input type="submit" name="submit" value="submit"/>
</form>
http://www.codexworld.com/drag-and-drop-file-upload-using-dropzone-php/ find demo here its complete demo and code explained
I want to validate the attachment description field to be as required field and do not upload the file. After clicking the submit button only file gets uploaded and validate the required field.
<form name="form1" method="post" enctype="multipart/form-data" action="index.php">
<div id="dropContainer" style="border:1px solid black;height:100px;width:100px;">
Drop Here
</div>
<div>
Attachment Description : <input type="text" name="description" id="description" required>
</div>
<div>
Should update here: <input type="file" name="fileInput" id="fileInput" />
</div>
<input type="submit" name="submit" value="submit"/>
</form>
</div>