You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Project's Form XML includes <instance id="features" src="jr://file-csv/features.csv"/><instance id="__last-saved" src="jr://instance/last-saved"/>
To Reproduce
Steps to reproduce the behavior:
I reproduced this on my local branch.
Expected behavior
I'd expect web forms to gracefully handle the jr:// protocol
Screenshots
Smartphone (please complete the following information):
Device: [e.g. iPhone6] Macbook
OS: [e.g. iOS8.1] MacOS
Browser [e.g. stock browser, safari] Chrome
Version [e.g. 22] N/A
Additional context
I think @spwoodcock has been discussing this, but just wanted to document this to provide some concrete test cases/scenarios. There's a good chance on repeating what has already been said.
The text was updated successfully, but these errors were encountered:
I'm mainly creating this issue to encourage any ideas on what a good work-around could be ...
One option could be to add a ?mode=browser param/flag to the "/{project_id}/form-xml" endpoint. In this case, the Python code could return an XML where "jr://file-csv/features.csv" is replaced by a url like "http://api.fmtm.localhost:7050/projects/1/features.csv"
I'm very very new to this, so I know that I'm definitely missing something, please do share your thoughts :-)
select_one_from_file features.csv is the ODK XLSForm shorthand to reference the Entity list in ODK Central called features.
When loading the (parsed) XForm XML we also need to load the Entity data alongside it somehow (I.e. the building dataset). I'm not sure how ODK Collect handles this to be honest.
This doesn't really help us though, as we need a working implementation to prototype in a few weeks 😅
We can pass in the Entity data from FMTM (which gets it from the Central API) to the web form. Then override the nodes that reference features.CSV if needed for the XML to parse correctly. We could possibly even remove the reference to features.csv entirely for now, then manually add the required XML selecting the entity ID during submission.
Could you possibly push the work so far to a branch? Then I could also pick it up and try to help with the web form development from tomorrow onwards 🙏 I'm sure the solution is there somewhere in the web forms xform-engine package
Describe the bug
Project's Form XML includes
<instance id="features" src="jr://file-csv/features.csv"/><instance id="__last-saved" src="jr://instance/last-saved"/>
To Reproduce
Steps to reproduce the behavior:
I reproduced this on my local branch.
Expected behavior
I'd expect web forms to gracefully handle the jr:// protocol
Screenshots
Smartphone (please complete the following information):
Additional context
I think @spwoodcock has been discussing this, but just wanted to document this to provide some concrete test cases/scenarios. There's a good chance on repeating what has already been said.
The text was updated successfully, but these errors were encountered: