I am using the name of a file uploaded for name purposes and to fill out fields in subsequent forms in a process.
I used the following code from this Laserfiche Answer post with just a minor change.
https://answers.laserfiche.com/questions/144900/File-Upload-Name-Change#144922
$(document).ready(function(){ $('#q5 input').on('change', function() { var filename = $('input[type=file]').val().split('\\').pop().slice(0,-4); $('#q16 input').val(filename); }) })
This code works perfectly when I click the upload button and adds a document. However when I try to use the drag and drop feature to upload a document the hidden textbox I use to store the file name does not get populated.
My question is why does this not seem to work if it is still a change event(or am I mistaken)?
Is there a way to disable the drag and drop ability if I can't get the name to populate correctly?