Hi

I'm in a situation where I need to provide a form with Add another functionality for field collection.(Done with module)
The main problem is that these field collections are interactive and other element's content depends on these.

To build an interactive UI I'm considering Knockout.js.

  • However, I have no idea how to attach it to these fields?
  • How and what to bind with ko.js to 'add another' event?
  • How to add all the attributes that ko.js uses e.g. data-bind to original and recently added fields?
  • And last but not least: how are values of multiple field instances saved to database? serialized?

Knockout.js is just one option and I haven't got that deep with it.
If there's some other framework that could be used for this and has already some real integration to Drupal? To build a somewhat SPA.

The whole project is a really small and simple site that basically stores product, configuration and order data and provides a multi-step order form (implemented with entityforms). Eventually sends out order confirmations and notices to administrator.