Just a fun idea using Enketo: real-time form design using XLSFORM

337 views
Skip to first unread message

El Piqo

unread,
May 12, 2016, 4:11:45 AM5/12/16
to enketo-users
Hi there, 

I believe XLSFORM form design has one major "missing part" and I think Enketo might help with that: it requires too many steps from form design, to a working 'Enketo form", so the form can be tested. 

Actually it works like this: 1. work on Excel XLSFORM -> 2. Convert to XML -> 3. upload to ODK (or equivalent) server (usually it is production) -> 4. initiate Enketo Form to generate Enketo Url -> 5. Test Form Logic (You have to do this every time you do a meaningful change of the form)

What is missing, I believe is a test environment for form designers where the user works on an Excel File (XLSFORM) (and on file change it is auto-converted to XML using pyxform perhaps?? and then the XML is picked up locally by Enketo (also locally/ or remotely if we upload it directly to some Enketo temporary directory))

Since the libraries are already there, can they be re-assembled so the end product will look like this: Work on Excel (XLSFORM) -> ALT + TAB and the browser appears with the Enketo Form updated. :)

Is this feasible as an idea,? Or do you have any other suggestion, alternative solution?

Ok then, my coffee break is over. :) 

Best, 
piqo

Martijn van de Rijdt

unread,
May 12, 2016, 10:21:19 AM5/12/16
to enketo...@googlegroups.com
I agree this is missing and I think it's a great idea! Thanks for sharing that. A third tab could show the underlying state of the XML model, which would be very useful when crafting logic and figuring out how it works.

However, if you don't mind using a GUI instead of a spreadsheet, you can get very close to this already by using the new KoBoForm (it actually uses XLSForm in the background). Clicking the preview button while building your form allows you to constantly check. It's very cool. I find myself slowly switching away from using XLSForm directly.

--
You received this message because you are subscribed to the Google Groups "enketo-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to enketo-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
Revolutionizing data collection since 2012.

Enketo    |    LinkedIn    |    GitHub    |    Twitter    |    Blog

El Piqo

unread,
May 18, 2016, 7:42:58 AM5/18/16
to enketo-users
We use solely xlsform, because that one is more appropriate for large/complex forms. 
I've tried KoBoForm, and it was great as well. 

Best, 

Ronald Kayondo

unread,
May 18, 2016, 8:20:09 AM5/18/16
to enketo...@googlegroups.com
Hi El Piqo,

If you do not mind you can try out https://github.com/kayr/xform-markup-editor there is a download here http://bit.ly/1OvDOoO .

Its an alternative xform generator that we mainly use internally. It supports generation of xforms quickly using plain formatted text , validates xpath formulas and supports quickly generating cascading selects using csv.

I usually use it in conjunction with https://enketo.org/formtester via the load file option.

The downside does not support all features in xlsform like appearance attributes etc.. However it satisfies most of our needs for now.

Ronald.
Ronald. K

Martijn van de Rijdt

unread,
May 18, 2016, 12:08:47 PM5/18/16
to enketo...@googlegroups.com
That looks really cool! 

Martijn

P.S. as you probably know the enketo.org/formtester is the old Enketo App, which is now very outdated. However, unfortunately there is no replacement for this tool in the new Enketo. It could be done outside of Enketo by using the Enketo API though.

Ronald Kayondo

unread,
May 18, 2016, 1:55:49 PM5/18/16
to enketo...@googlegroups.com

Thanks Martijn... I realised it was outdated but I couldn't find a new version.

I probably should try out the api but unfortunately am not very conversant with the node-js stack. Is there a hosted **demo** enketo somewhere that can be used to test the api? If not I will try to install one.

And thanx for the great work on enketo!!

Ronald.

Martijn van de Rijdt

unread,
May 18, 2016, 2:51:48 PM5/18/16
to enketo...@googlegroups.com
Thank you Ronald,

There isn't reliable hosted demo with a public api key, but maybe a good way would be to use vagrant and install it as a local VM: https://github.com/kobotoolbox/enketo-express#using-vagrant

I realize now that for this particular usage scenario (with draft forms), it's better not use the API but just append a form query parameter to a preview, like this: https://odk.enke.to/preview?form=http://23.21.114.69/xlsform/downloads/tmpwRs9Bh/aW9gGV4P2cqckht2Bg3Api.xml (temporary link). This is exactly what is done on http://opendatakit.org/xiframe (Preview in Enketo button).

Maybe you could output this URL to the user when the XForm has been built.

Still doesn't change the need to set up an Enketo server though.

Cheers,

Ronald Kayondo

unread,
May 19, 2016, 4:14:07 AM5/19/16
to enketo...@googlegroups.com

Great that's helpful..Thanks.

El Piqo

unread,
May 19, 2016, 4:19:04 AM5/19/16
to enketo-users
Hi Ronald, 
That is pretty a cool project. I forwarded it to our form designers. Some questions:

1. What else is not supported except appearance?
2. Anyone knows a good xml to xlsform (xls) converter, so we can work on xls if something is not supported in OXD-markup?
3. Is there any option to save as XML (ODK) because there was only the option that shows a dialog with the xml?

Best, 
piqo

Ronald Kayondo

unread,
May 19, 2016, 5:11:32 AM5/19/16
to enketo...@googlegroups.com
Thanx Piqo,

To answer your questions,

1. Am not an xlsform guru so I do not know all xlsform features but
off the top of my head is:
-adding extra bind attributes outside the standard ones.. e.g
jr:preload. I know this would affect things like auto pre-filling end
time so the workaround would be to have a question assigned @id
endtime then select "preferences" -> "Emulate oxd to odk" before you
generate the xml. *Am working on fixing this feature soon*

-adding layout attributes e.g appearance and jr:count(there is a
workaround for this too). *Am working on fixing this feature soon*

-having multiple languages in the same form

-For now you cannot have groups with in groups. In the editor pages
translate to groups but you cannot have a page within a page


2. I am not sure I have heard of any xml to xlsform converter.May be
Martijn knows?

3. There is no option right now to save the odk xml. What we usually
do is save the markup text itself(.xfm) using "File -> Save". And
whenever we need the odk xml we just regenerate it.

On 5/19/16, El Piqo <piq...@gmail.com> wrote:
> Hi Ronald,
> That is pretty a cool project. I forwarded it to our form designers. Some
> questions:
>
> 1. What else is not supported except appearance?
> 2. Anyone knows a good xml to xlsform (xls) converter, so we can work on
> xls if something is not supported in OXD-markup?
> 3. Is there any option to save as XML (ODK) because there was only the
> option that shows a dialog with the xml?
>
> Best,
> piqo
>
> On Thursday, May 19, 2016 at 10:14:07 AM UTC+2, ronald k wrote:
>>
>> Great that's helpful..Thanks.
>> On May 18, 2016 9:51 PM, "Martijn van de Rijdt" <mar...@enketo.org
>>>>>>>> mode <https://github.com/kobotoolbox/enketo-express/issues/100>l,
>>>>>>>> which would be very useful when crafting logic and figuring out how
>>>>>>>> it
>>>>>>>> works.
>>>>>>>>
>>>>>>>> However, if you don't mind using a GUI instead of a spreadsheet, you
>>>>>>>>
>>>>>>>> can get very close to this already by using the new KoBoForm (it
>>>>>>>> actually
>>>>>>>> uses XLSForm in the background). Clicking the preview button while
>>>>>>>> building
>>>>>>>> your form allows you to constantly check. It's very cool. I find
>>>>>>>> myself
>>>>>>>> slowly switching away from using XLSForm directly.
>>>>>>>>
>>>>>>>> On Thu, May 12, 2016 at 2:11 AM, El Piqo <piq...@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> Hi there,
>>>>>>>>>
>>>>>>>>> I believe XLSFORM form design has one major "missing part" and I
>>>>>>>>> think Enketo might help with that: it requires too many steps from
>>>>>>>>> form
>>>>>>>>> design, to a working 'Enketo form", so the form can be tested.
>>>>>>>>>
>>>>>>>>> Actually it works like this: 1. work on Excel XLSFORM -> 2. Convert
>>>>>>>>>
>>>>>>>>> to XML -> 3. upload to ODK (or equivalent) server (usually it is
>>>>>>>>> production) -> 4. initiate Enketo Form to generate Enketo Url -> 5.
>>>>>>>>> Test
>>>>>>>>> Form Logic (You have to do this every time you do a meaningful
>>>>>>>>> change of
>>>>>>>>> the form)
>>>>>>>>>
>>>>>>>>> What is missing, I believe is a* test environment* for form
>>>>>>>>> designers where the user works on an Excel File (XLSFORM) (and on
>>>>>>>>> file
>>>>>>>>> change it is auto-converted to XML using pyxform perhaps?? and then
>>>>>>>>> the XML
>>>>>>>>> is picked up locally by Enketo (also locally/ or remotely if we
>>>>>>>>> upload it
>>>>>>>>> directly to some Enketo temporary directory))
>>>>>>>>>
>>>>>>>>> Since the libraries are already there, can they be re-assembled so
>>>>>>>>>
>>>>>>>>> the end product will look like this: Work on Excel (XLSFORM) -> ALT
>>>>>>>>> + TAB
>>>>>>>>> and the browser appears with the Enketo Form updated. :)
>>>>>>>>>
>>>>>>>>> Is this feasible as an idea,? Or do you have any other suggestion,
>>>>>>>>>
>>>>>>>>> alternative solution?
>>>>>>>>>
>>>>>>>>> Ok then, my coffee break is over. :)
>>>>>>>>>
>>>>>>>>> Best,
>>>>>>>>> piqo
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> You received this message because you are subscribed to the Google
>>>>>>>>>
>>>>>>>>> Groups "enketo-users" group.
>>>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>>>> send an email to enketo-users...@googlegroups.com.
>>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> *Revolutionizing data collection since 2012.*
>>>>>>>>
>>>>>>>> Enketo <https://enketo.org/> | LinkedIn
>>>>>>>> <http://www.linkedin.com/company/enketo-llc> | GitHub
>>>>>>>> <https://github.com/enketo> | Twitter
>>>>>>>> <https://twitter.com/enketo> | Blog <http://blog.enketo.org/>
>>>>>>>>
>>>>>>> --
>>>>>>> You received this message because you are subscribed to the Google
>>>>>>> Groups "enketo-users" group.
>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>> send an email to enketo-users...@googlegroups.com <javascript:>.
>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Ronald. K
>>>>>>
>>>>>> --
>>>>>> You received this message because you are subscribed to the Google
>>>>>> Groups "enketo-users" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>>>
>>>>>> an email to enketo-users...@googlegroups.com <javascript:>.
>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> *Revolutionizing data collection since 2012.*
>>>>>
>>>>> Enketo <https://enketo.org/> | LinkedIn
>>>>> <http://www.linkedin.com/company/enketo-llc> | GitHub
>>>>> <https://github.com/enketo> | Twitter
>>>>> <https://twitter.com/enketo> | Blog <http://blog.enketo.org/>
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "enketo-users" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>>
>>>>> an email to enketo-users...@googlegroups.com <javascript:>.
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "enketo-users" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to enketo-users...@googlegroups.com <javascript:>.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>
>>> --
>>> *Revolutionizing data collection since 2012.*
>>>
>>> Enketo <https://enketo.org/> | LinkedIn
>>> <http://www.linkedin.com/company/enketo-llc> | GitHub
>>> <https://github.com/enketo> | Twitter <https://twitter.com/enketo>
>>>
>>> | Blog <http://blog.enketo.org/>
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>>
>>> "enketo-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an
>>>
>>> email to enketo-users...@googlegroups.com <javascript:>.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "enketo-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to enketo-users...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>


--
Ronald. K

Martijn van de Rijdt

unread,
May 19, 2016, 3:38:55 PM5/19/16
to enketo-users
I don't think there is a separate XForm to XLSForm conversion tool, though KoBo had a basic version of such a tool built into KoBoForm. I've been told that functionality has not been ported to the new beta version. The code currently lives in dkobo.
Reply all
Reply to author
Forward
0 new messages