mozilla/appmaker-components — pull request #30 by davidascher (2013-08-29 04:48:29+00:00)
Title: Make inputs and submit form work together to create compound forms

By adding a toggle to input components, it's now possible to have up to 4 input forms send their data on data change (not on submit click) to a submit button, which aggregates them and sends them (currently as a JSON string) on hitting a submit button. The submit button has attributes which determine the keys to be used in the k-v struct.

e.g.
input(defaultText=Name) -> submit.slotA
input(defaultText=Phone) -> submit.slotB

submit.slotA = "name"
submit.slotB = "phone"

then if you type 'david' in the first input and 123 in the second, and hit submit, submit will emit {'name': 'David', 'phone': 123} (e.g. to be processed by a data-list)

I think I'll get rid of the JSONificiation after I play with it e.g. w/ the map widget (e.g. specify Lat & Long), but wanted to share early & often.