Open IL55 opened 10 years ago
Hi, I implemented what I described in previous letter. Could anyone review my solution ? From user point of view, I added "dataAlias" parameter, which means alias for data for serialization to/from JSON object,
"cityUSA": {
"dataAlias": "city",
"dependencies": {
"country": "USA"
}
}
More details here http://jsfiddle.net/9ffYY/15/
Here is pull request: https://github.com/gitana/alpaca/pull/92
Hi,
Let's imagine that you want to get user location: country and city, i.e. form.onSubmit should produce: { "country": "USA", "city": "New Orleans" } How I can do it via series of dependent selects ?
I prepare example, to show what I ask: http://jsfiddle.net/9ffYY/8/
If you press on submit button, you can see "cityUSA" { "country": "USA", "cityUSA": "New Orleans" }
In that case post processing needed, i.e. some function should be change "cityUSA" to "city" and only after the post-processing, form can send data to server.
I put my question to stackoverflow due to largest community, and if you want to get some reputation points http://stackoverflow.com/questions/20404373/alpaca-form-generator-series-of-selects
Thanks, Igor