edina / fieldtrip-cobweb-project

A cobweb theme for fieldtrip app
BSD 3-Clause "New" or "Revised" License
0 stars 2 forks source link

HTML form to json or survey.json #54

Closed panterz closed 8 years ago

panterz commented 9 years ago

COBWEB has given some few extra requirements. Some extra elements should be predefined inside the form in order the user to download them when he/she downloads the form.

<input type="hidden" data-dtree="editors/111-222-333-444.json"></div>
<input type="hidden" data-layers="dyfi.mbtiles">
<input type="hidden" data-bbox="22.311806872606873,40.02559816362384,22.496514514208435,40.15009980462884">
<input type="hidden" data-record-geometry="point,polygon">

So the big question is if we should go for a json file that will include all these elements and the html form will be rendered with fields that are coming from this json file or we can just create a survey.json that will have the path of the html form.

benismobile commented 9 years ago

seems to me some of these (e.g. GPS timeout fallback location) relate more to application level configuration.

xmichael commented 9 years ago

So the big question is if we should go for a json file that will include all these elements and the html form will be rendered with fields that are coming from this json file or we can just create a survey.json > that will have the path of the html form.

It seems that the less files we have the better in order to avoid any synchronization and parsing problems. As far as cobweb is concerned, the move from html to json will enable us to:

In any case the html5 should be fairly easy to generate from json using a template (or even string substitution).

panterz commented 8 years ago

We have done this. There's a survey.json. I need to add it on the wiki.