Is it possible to bind a single atom to all the fields in a form. The atom would be a map and each key in the map will correspond to the respective input id's in the form.
From the examples I gather that an atom will have to be defined for each input field, rather than one atom for all fields. Is that possible?
Firstly, sorry for not spotting this issue sooner. It isn't currently possible to bind a single atom to all fields in a form. It is a great idea though, and I will look at implementing this shortly.
added support for using a map to bind multiple fields to atom. fixes #2
I have added support for this, updated the readme and also added a maptest example. I have pushed the latest code to clojars, so 1.0.0-SNAPSHOT now contains this addition.
Please do let me know if this change meets your requirements.
I am looking into ways to either evolve cljs-binding in that direction, or build upon it to provide more facilities for client-side clojurescript / html generation, and synchronisation of state between browser, and server.
If you had any suggestions on what features you would find useful, they would be gratefully received.
That's ok. It's great to have some feedback.
I have been looking at using hiccup/crate. I think crate combined with some functions that make the binding easier could be a useful addition to the library.
I'm thinking something along the lines of a function that can be called, passing in an atom that will generate html using crate based on a template function passed in. The generated elements would automatically have all bindings wired up.