Get the name of a upload file

Hello everybody,

I’am using a custom element in Webflow set up as input + type=file
In wized I want to use the name of the file selected (available either in Input or forms fields) but I cannot return something else than null. (see screenshot below)

Is there anything I can do to get this value ?

Thank you.

Hello @abarbier804

This can be achieved by attaching an on change event to the input and using the data from the inputs and not the form data in data store, because form data only gets populated on submit.

Attached is a screenshot where I have the name set to a variable, then I can use the variable to set the text of an element. The return value is:

return i.fileInput[0].name;