Can't create instance for sub form


(Narendra S Thakuri) #1

Dear All,
ODK2.0:
I have created two different tables for the survey. Census is a parent form and then sub form “members” will populate by creating instance but when create new instance for the sub form it will return back to the main page. I can’t create new members. I attached both files, could anyone please help me?
Thanks in advance.
census.xlsx (14.2 KB)
members.xlsx (13.2 KB)


(Caroline) #2

Hi @nsthakuri!

Can you tell us a little more about the problem? What exactly do you mean when you say you cannot create new members? Are you getting an error message? Is the add new instance button just not showing up?

Best,
Caroline


(Narendra S Thakuri) #3

Hi @elmps2018,


Thanks for showing concern about it.
Initially we enter household ID in census form and then second step is to capture household member’s information through members form by clicking on Create new instance (as shown in 4.jpg) but it returns to the main page (1.jpg) when clicking on this button. The member form will not populate. Could you please give idea to solve it.
Thanks,
Narendra


(Caroline) #4

Dear @nsthakuri,

Oh this is very helpful, thank you for the screenshots and additional info! So it looks like you are having this problem in the app-designer preview. Can you try testing it in survey on a tablet and see if that works?

As I recall, we had this problem with testing sub-forms in the app-designer as well at one point (on an earlier version). But they worked fine on survey. If this is the case for you as well, there may be a bug in app-designer handling sub-forms and we can create an issue to get that investigated.

Best,
Caroline


(Narendra S Thakuri) #5

Dear @elmps2018,
Thank you for this information which is very helpful. Yes, now it works on device however doesn't work on app-designer. I think there may be a bug in app-designer for sub-forms.
Thanks,
Narendra


(Caroline) #6

Dear @nsthakuri,

I am tagging @linl33 and @clarice_larson on this in hopes that they can follow up or create an issue on GitHub.

Best,,
Caroline


(clarice larson) #7

Thanks for bringing this to my attention. I was able to get these forms to work in the latest app-designer without changes. One thing to check is that you've placed the forms in the correct directory.

census - app-designer/app/config/tables/census/forms/census
members - app-designer/app/config/tables/members/forms/members

If the issue still exists, providing what version of the app-designer you are using and what OS you are on would be useful. Also, if you could open up the developer tools in Chrome and send the output from the console that would be helpful. Directions for accessing the console can be found at https://developers.google.com/web/tools/chrome-devtools/console/.