Closed orolle closed 6 years ago
(html {:mode :html5} [:input {:multiple true :type "file"}])
Or use hiccup.page/html5
. So long as the mode is set to HTML5 at the top level, it will use attributes without values. For compatibility reasons, the default is to mirror the name and value, which is treated by browsers as the same thing.
Thanks a lot! That worked! :+1:
<input type="file" name="img" multiple></input>
I could not represented the above html in hiccup because "multiple" is not a regular attribute. I also tried http://html2hiccup.buttercloud.com/ to convert it into hiccup but it also failed.
[:input {:multiple :type "file"} ]
Error: Map literals must contain an even number of forms.[:input {:multiple nil :type "file"} ]
False: Translates to<input type="file"></input>