Can I use an XForm directly?

Hello! I've been looking at how I could use ODK and the related technologies for the last couple months. I work in the civic engagement space and work heavily in XML based technologies. My understanding is the ODK works off of XForms for rendering forms and processing. I already have some XForms I'd like to use as a basis (I can modify to fit the limitations of the ODK spec), but the problem I'm running into is that all the tools I've tried to use so far have abstracted the XForms layer away, and are either WYSIWYG tools or spreadsheet based. Are there any tools that will ingest XForms directly? I would prefer to edit my forms code directly rather than use an intermediate format.



Welcome! Which tools have you tried? ODK Collect and ODK Aggregate both expect XForms directly.

You can use any XML editor (eg Apple's Xcode actually does a pretty good job), or even simple raw text editor for that matter. I do this when first custom-writing XForms, or when I need to tweak the XForms that a tool like Kobo spits out (eg removing its geopoint hint...).

Once you have an XML XForm, you can import it directly into the likes of ODK Aggregate or associated tools, which are all XML XForm based. Alas, some tools - like Kobo - are XLSForm based and can therefore only ingest XLSForms; they can't actually import a 'real' XML XForm definition. :frowning: Basically, any valid XSLForm can always be represented as an XML XForm, but unfortunately not every valid XML XForm can be represented as an XSLForm spreadsheet [to be clear, XLSForm-to-XForm is a direct mechanical translation; but the reverse can require some intelligent re-interpretation].


Hi. Ok it sounds like I need to try ODK Aggregate. I've been playing with the VirutalBox image and it looks like form rendering is not build in. I take it I need something like Enketo for that?

ODK Aggregate is pretty much your submissions database repository. You can launch Enketo from Aggregate directly to fill in a particular form, or 'render it' (eg if you just want to preview a newly written form). Aggregate can also export and/or stream submissions elsewhere, if you want to build additional workflow around post-form submission; details here.

If you want to stick with actual XForms (vs XLSForms) then you will definitely want to check out all the various available ODK tools: Collect (XForms client), Aggregate (XForms server), Briefcase (CLIs), Central (REST server), etc. Hopefully you'll find something that fills your need; if not, yer always welcome to propose a new feature! Or better yet, contribute the code :slight_smile: