jkk / formative

Web forms for Clojure and ClojureScript - rendering, parsing, and validating

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't upload file

punit-allstreet opened this issue · comments

I am rendering a form by using the handle-submit fn as I don't want the submit button to fire a post request on clicking.

But I have a file upload field in my form. And when the formative.dom/handle-submit fn calls the
formative.dom/serialize fn, it removes the file input field type while it's serialising form parameters and hence the formative.parse/parse-input fn is never called.

So how can I do file upload without having the default POST behaviour?

Hi @punit-allstreet !

I think I can't help much directly as I have not used the formative.dom facility myself.
IMO it is a method that was a workaround for the lack of react back in the days, so if it is for a new page I strongly would recommend a react based solution such as reagent-forms.

Other than that happy to look at a minimal project or accept PRs!