If someone selects a file to upload from their computer, then decides they do not want to upload a file, is there a way they can remove/delete their choice before they submit the form?
Appnitro Software Forums » MachForm 2
Remove file to be uploaded
Started 2 years ago by isak | 3 posts |
-
Posted 2 years ago #
-
Hi,
You can add a custom clear button beside "file upload" field. To do so, you need to edit "includes/view-functions.php" file. Go to around line 127, you will see these code :
<input id="element_{$element->id}" name="element_{$element->id}" class="element file" type="file" />put these code exactly bellow that line
<input id="reset" type="button" onclick="javascript:clearFileInputField('li_{$element->id}');" value="Clear" />Then, go to line 1834, you will see this code :
{$calendar_js}put these code bellow that line
<script type="text/javascript"> function clearFileInputField(tagId) { document.getElementById(tagId).innerHTML = document.getElementById(tagId).innerHTML; } </script>MachForm Support
Posted 2 years ago # -
Nice one - this should be a 'sticky'!
Posted 2 years ago #
Reply
You must log in to post.
