KoBo Form, multiple issues

Hi

I’m trying to use Kobo Form to set up a questionnaire with a Repeating Group and Skip Logic within the group. [If I didn’t need this stuff, I’d be using a simpler form builder!]

But I get multiple issues, e.g. I can’t load the Settings window, and dragging or creating questions within groups seems to cause all sorts of problems ("unexpected failure"messages, "not a valid variable"messages, etc.).

I don’t know about XML, I’m not an expert… is it worth me spending time trying to resolve things issue by issue, or is this simply a Beta that really isn’t working yet?

I’m using Firefox 13.01 with Java 10.7.2.11 enabled.

Thanks!

Phosphaenus,
I’m sure we can help you get going, we have been doing a lot of development and it’s possible a recent update is behaving unexpectedly.
First, let’s make sure that you are using the most up to date version of KoBoForm.

  1. Are you operating Online or using the offline version of KoBoForm?
  2. Please check the version in the title bar. Does your version read “KoBo Form Designer - 1.0.20”?

~Neil
KoBo Developer

···

On Fri, Oct 5, 2012 at 7:05 AM, Phosphaenus phosp...@gmail.com wrote:

Hi

I’m trying to use Kobo Form to set up a questionnaire with a Repeating Group and Skip Logic within the group. [If I didn’t need this stuff, I’d be using a simpler form builder!]

But I get multiple issues, e.g. I can’t load the Settings window, and dragging or creating questions within groups seems to cause all sorts of problems ("unexpected failure"messages, "not a valid variable"messages, etc.).

I don’t know about XML, I’m not an expert… is it worth me spending time trying to resolve things issue by issue, or is this simply a Beta that really isn’t working yet?

I’m using Firefox 13.01 with Java 10.7.2.11 enabled.

Thanks!

You received this message because you are subscribed to the Google Groups “Kobo Users” group.

To view this discussion on the web visit https://groups.google.com/d/msg/kobo-users/-/RLyIJFRRrLMJ.

To post to this group, send email to kobo-...@googlegroups.com.

To unsubscribe from this group, send email to kobo-users+...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/kobo-users?hl=en.

Neil - Many thanks for response, I really appreciate that. I’m using the online builder at http://formbuilder.koboproject.org/ - this indicates 1.0.19 in the title bar, not 1.0.20 - thanks!

Phosphaenus,

That’s the issue.

Please switch to the main KoBoForm on the KoBoToolbox site, you can find it here:

http://www.kobotoolbox.org/koboform/

Let’s see if you have any of the same issues, sorry for the confusion.

~Neil

···

On Fri, Oct 5, 2012 at 12:08 PM, Phosphaenus phosp...@gmail.com wrote:

Neil - Many thanks for response, I really appreciate that. I’m using the online builder at http://formbuilder.koboproject.org/ - this indicates 1.0.19 in the title bar, not 1.0.20 - thanks!

You received this message because you are subscribed to the Google Groups “Kobo Users” group.

To view this discussion on the web visit https://groups.google.com/d/msg/kobo-users/-/-wSn_ACNBxQJ.

To post to this group, send email to kobo-...@googlegroups.com.

To unsubscribe from this group, send email to kobo-users+...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/kobo-users?hl=en.

Hi Neil - ok thanks, but when I go to your link it still says 1.0.19, and I still seem to be getting the same problems. Maybe I’m doing something stupid?

Let’s take a look at your survey. Can you send it as an attachment? I will load it up in KoBoForm and see where it is hiccuping.

`NEIL

···

On Fri, Oct 5, 2012 at 5:18 PM, Phosphaenus phosp...@gmail.com wrote:

Hi Neil - ok thanks, but when I go to your link it still says 1.0.19, and I still seem to be getting the same problems. Maybe I’m doing something stupid?

You received this message because you are subscribed to the Google Groups “Kobo Users” group.

To view this discussion on the web visit https://groups.google.com/d/msg/kobo-users/-/ImTL_SnxriUJ.

To post to this group, send email to kobo-...@googlegroups.com.

To unsubscribe from this group, send email to kobo-users+...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/kobo-users?hl=en.

Hi Neil

Many thanks again for your willingness to help with this…

  1. I attach the form I’m try to construct. It’s not the complete questionnaire, but it shows the structure (see below).

  2. I’m happy to share my username and password with you, if that helps: just email me at gnormanATwsup.com.

Many thanks again!

Here is the structure I’m trying to construct, with indication of the types of error I’m getting…

  1. District identifier code [response: text]
  2. Interviewer: Have you read out consent form [response: yes or no]
    SKIP LOGIC: all subsequent questions skip to end if response 2 = no
    GROUP: Households
  3. REPEATING QUESTION: Add another household member?
    3.1) Is [NAME] male or female [response: m or f]
    3.2) How old is [NAME]? [response: number]
    SKIP LOGIC: skip next question if response 3.1.2>18 [but I get error message “3.2 is not a valid question”
    3.3) Has [NAME] missed school because of sickness over the last 7 days? [response: yes or no]
    [end repeating group]
  4. What is the main type of water supply for this house? [response: select one]
    END

I have difficulties when I try to drag questions within the form.

Also, I get an error message when I try to adjust Settings.

WSUP-GN form attempt 1.xml (4.98 KB)

So summarising my main problems…

  1. When I try to set skip logic dependent on 3.2 [i.e. only ask school absence questions for people aged 18 or less), I get error message “3.2 is not a valid question”

  2. I can’t add or drag questions into the group once formed: I get an error window with “Unexpected Failure” containing message starting “(TypeError): g is null”.

Thanks!

Looking again, that attachment may not have worked, so here is the xml…

<?xml version="1.0" encoding="UTF-8"?>

<h:html xmlns:jr=“http://openrosa.org/javarosa” xmlns:h=“http://www.w3.org/1999/xhtml” xmlns:kobo=“http://www.kobotoolbox.org/xmlns” xmlns:xsd=“http://www.w3.org/2001/XMLSchema”>
<h:head>
<h:title ref=“jr:itext(‘new_form1’)”>New Form 1</h:title>


<new_form1 id=“new_form1”>






<A05_02/>
<A05_03/>
<A05_04/>


</new_form1>













New Form 1


1) District identifier code


2) Interviewer: Have you read out consent form?


Yes


No


Households


3) Add another householder member?


3.1) Is [NAME] male or female?


M


F


3.2) How old is [NAME]?


3.3) Has [NAME] missed school because of sickness over the last 7 days?


Yes


No


4) What is this household’s main water supply?


a) Indoor tap


b) Outdoor tap


c) etc




</h:head>
<h:body>







1



2











1



2









1



2









1



2



3


</h:body>
</h:html>

P,

thanks for the details. I’m taking a look at this and will see what is the solution and get back to you today.

~Neil

···

On Mon, Oct 8, 2012 at 7:56 AM, Phosphaenus phosp...@gmail.com wrote:

Looking again, that attachment may not have worked, so here is the xml…

<?xml version="1.0" encoding="UTF-8"?>

<h:html xmlns:jr=“http://openrosa.org/javarosa” xmlns:h=“http://www.w3.org/1999/xhtml” xmlns:kobo=“http://www.kobotoolbox.org/xmlns” xmlns:xsd=“http://www.w3.org/2001/XMLSchema”>

<h:head>
<h:title ref=“jr:itext(‘new_form1’)”>New Form 1</h:title>


<new_form1 id=“new_form1”>

      <start/>
      <end/>
      <A01/>
      <A02/>
      <A05 jr:template="">
        <A05_02/>
        <A05_03/>
        <A05_04/>

      </A05>
      <A06/>
    </new_form1>
  </instance>
  <bind id="deviceid" nodeset="/new_form1/deviceid" type="xsd:string" jr:preload="property" jr:preloadParams="deviceid" visible="false()"/>

  <bind id="start" nodeset="/new_form1/start" type="xsd:time" jr:preload="timestamp" jr:preloadParams="start" visible="false()"/>
  <bind id="end" nodeset="/new_form1/end" type="xsd:time" jr:preload="timestamp" jr:preloadParams="end" visible="false()"/>

  <bind id="A01" nodeset="/new_form1/A01" type="xsd:string" required="true()"/>
  <bind id="A02" nodeset="/new_form1/A02" type="xsd:string" required="true()"/>

  <bind id="A05_02" nodeset="/new_form1/A05/A05_02" type="xsd:string" required="true()"/>
  <bind id="A05_03" nodeset="/new_form1/A05/A05_03" type="xsd:int" required="true()"/>

  <bind id="A05_04" nodeset="/new_form1/A05/A05_04" type="xsd:string" required="true()"/>
  <bind id="A06" nodeset="/new_form1/A06" type="xsd:string" required="true()" relevant="/new_form1/A02 = '1'"/>

  <itext>
    <translation lang="English">
      <text id="new_form1">
        <value>New Form 1</value>
      </text>
      <text id="A01">

        <value>1) District identifier code</value>
      </text>
      <text id="A02">
        <value>2) Interviewer: Have you read out consent form?</value>

      </text>
      <text id="A02_1">
        <value>Yes</value>
      </text>
      <text id="A02_2">
        <value>No</value>

      </text>
      <text id="A04">
        <value>Households</value>
      </text>
      <text id="A05">
        <value>3) Add another householder member?</value>

      </text>
      <text id="A05_02">
        <value>3.1) Is [NAME] male or female?</value>
      </text>
      <text id="A05_02_1">

        <value>M</value>
      </text>
      <text id="A05_02_2">
        <value>F</value>
      </text>
      <text id="A05_03">

        <value>3.2) How old is [NAME]?</value>
      </text>
      <text id="A05_04">
        <value>3.3) Has [NAME] missed school because of sickness over the last 7 days? </value>

      </text>
      <text id="A05_04_1">
        <value>Yes</value>
      </text>
      <text id="A05_04_2">
        <value>No</value>

      </text>
      <text id="A06">
        <value>4) What is this household's main water supply?</value>
      </text>
      <text id="A06_1">

        <value>a) Indoor tap</value>
      </text>
      <text id="A06_2">
        <value>b) Outdoor tap</value>
      </text>
      <text id="A06_3">

        <value>c) etc</value>
      </text>
    </translation>
  </itext>
</model>

</h:head>
<h:body>

  <label ref="jr:itext('A01')"/>
</input>
<select1 bind="A02">
  <label ref="jr:itext('A02')"/>
  <item>
    <label ref="jr:itext('A02_1')"/>

    <value>1</value>
  </item>
  <item>
    <label ref="jr:itext('A02_2')"/>
    <value>2</value>
  </item>
</select1>

<group id="A04">
  <label ref="jr:itext('A04')"/>
  <group id="A05">
    <label ref="jr:itext('A05')"/>
    <repeat nodeset="/new_form1/A05">

      <select1 bind="A05_02">
        <label ref="jr:itext('A05_02')"/>
        <item>
          <label ref="jr:itext('A05_02_1')"/>

          <value>1</value>
        </item>
        <item>
          <label ref="jr:itext('A05_02_2')"/>
          <value>2</value>

        </item>
      </select1>
      <input bind="A05_03">
        <label ref="jr:itext('A05_03')"/>
      </input>
      <select1 bind="A05_04">

        <label ref="jr:itext('A05_04')"/>
        <item>
          <label ref="jr:itext('A05_04_1')"/>
          <value>1</value>

        </item>
        <item>
          <label ref="jr:itext('A05_04_2')"/>
          <value>2</value>
        </item>
      </select1>

    </repeat>
  </group>
</group>
<select1 bind="A06">
  <label ref="jr:itext('A06')"/>
  <item>
    <label ref="jr:itext('A06_1')"/>

    <value>1</value>
  </item>
  <item>
    <label ref="jr:itext('A06_2')"/>
    <value>2</value>
  </item>
  <item>

    <label ref="jr:itext('A06_3')"/>
    <value>3</value>
  </item>
</select1>

</h:body>
</h:html>

You received this message because you are subscribed to the Google Groups “Kobo Users” group.

To view this discussion on the web visit https://groups.google.com/d/msg/kobo-users/-/JBprOdSADCUJ.

To post to this group, send email to kobo-...@googlegroups.com.

To unsubscribe from this group, send email to kobo-users+...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/kobo-users?hl=en.

Phosphaenus,

Thanks for sending your XML, i see what’s happening.
OK, looking at your form in KoBoForm, I have looked at what you are trying to do, here follows some comments and solutions:

Here is the structure I’m trying to construct, with indication of the types of error I’m getting…

  1. District identifier code [response: text]
    It makes no difference, but out of curiosity, is there a reason you are recording this ID# as text? You can record it as a number as long as it is less than 9 digits. If datatype is set to “Number” you can operate on it mathematically, though that is likely a moot point since this is an ID number.
  1. Interviewer: Have you read out consent form [response: yes or no]
    SKIP LOGIC: all subsequent questions skip to end if response 2 = no

This requires that skip logic be applied to each question you want to skip.

GROUP: Households
3) REPEATING QUESTION: Add another household member?
skip logic added here.

3.1) Is [NAME] male or female [response: m or f]
skip logic added here.

3.2) How old is [NAME]? [response: number]
skip logic added here. (for q 2)

SKIP LOGIC: skip next question if response 3.1.2>18 [but I get error message “3.2 is not a valid question”
Yes, this is a flaw in KoBoForm which you have discovered, and for which you have our thanks. It’s a little confused by skip logic inside of groups, however, there is a workaround.
We will use the Hand Code option.

3.3) Has [NAME] missed school because of sickness over the last 7 days? [response: yes or no]
[end repeating group]
We want to skip this question is 3.2 is > 18 (because the person is too old for school)
Put a check mark in the Hand Code option. You will see that there is already a piece of code in there for question 2. This skip logic is correct because it refers to a question that is not part of a group.

Add a line that refers to question 3.2, and wants the answer to be < 18.

/WSUP/A05/A05_03 < 18

You will notice that this refers to quesion 3.2 as “A05_3”. This is the actual node name in the XML, you can find the node name for any question by selecting that question in KoBoForm and clicking “Show Advanced Properties”.

  1. What is the main type of water supply for this house? [response: select one]
    Here, i see that the skip logic is applied correctly. I did not see the same skip logic applied to other questions.

(Please note that we have an issue with the “Apply to other questions” function, so you can’t use that for questions inside a group. Expect a fix with the next release. )

I have difficulties when I try to drag questions within the form.

What are the difficulties?

Also, I get an error message when I try to adjust Settings.
Can you send a screen print of the error?

Some other comments:

You have named your group: 3) Add another householder member?
But you should name it something like “Household Member” because otherwise the app will ask you “Add New Group? Add a new “3) Add another householder member?” group?”

It’s better to make it say
*“Add New Group? Add a new “Household Member” group?”

···

You received this message because you are subscribed to the Google Groups “Kobo Users” group.

To view this discussion on the web visit https://groups.google.com/d/msg/kobo-users/-/SHaejv0kv38J.

To post to this group, send email to kobo-...@googlegroups.com.

To unsubscribe from this group, send email to kobo-users+...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/kobo-users?hl=en.

Many thanks again Neil. I’ve read this carefully, and I now have two major outstanding queries…

  1. For my question 3.3 “Has [NAME] missed school because of sickness over the last 7 days?”, which lies within a group, and for which I want to set skip logic dependent on two previous questions (one prior to the group, one within it), you say “put a check mark in the Hand Code option… you will see that there is already a piece of code in there for question 2… add a line /WSUP/A05/A05_03 < 18”. You haven’t attached a version of my file, nor does my file online have this piece of code already there… so exactly what lines of code should I enter here? I’m guessing there is one line for the skip dependent on the question prior to the group, then the line you indicate for the skip dependent on the prior question within the group. Right?

  2. I also have problems with adding or dragging questions within the group once formed; this is pretty critical, it’s very difficult for me to input a long form if I can’t add and drag. When I do the following on my computer I get this error… I open a new form, I add a group, I add a repeating section, I add a text question, I add another text question [for rapid-illustration purposes without actually putting text into each question, just creating the component]… then if I drag the second question up above the first question, I get an error window saying “Unexpected Failure” containing message starting “(TypeError): g is null”, and from then on the question I tried to drag can’t be changed or deleted, and isn’t recovered when I save and then re-open the form. I get similar errors with other types of drag (e.g. moving questions down), and with simply adding questions.

I hope these descriptions of my problems are clear.

Thanks again!

I get the same error when dragging and
dropping, it then places the question one question lower than the drop
indicator, but I can then click OK on the error message and move it one
more up and it is OK.
I am also experiencing problems where
I change the question name (text) but then it is not reflected on the left
hand side question summary.

Paul Hamlin

FINCA International


The message above may contain information that is confidential and/or privileged and is intended solely for the use of the individual to whom it is addressed. If this message has reached a recipient inadvertently, further dissemination is prohibited. Please delete the information and notify the sender by return email or by calling FINCA at +1.202.682.1510.

Thanks Paul, great to see someone else battling with this, feels like a team effort now! I don’t get offered an OK button with my error messages, just a Close button, and that doesn’t seem to help…