Skip to content

Hide subforms#155

Open
sanyud24 wants to merge 1 commit intoodk-x:developmentfrom
sanyud24:subForms
Open

Hide subforms#155
sanyud24 wants to merge 1 commit intoodk-x:developmentfrom
sanyud24:subForms

Conversation

@sanyud24
Copy link
Copy Markdown

Fixes : odk-x/tool-suite-X#154
manually hide subforms w.r.t positions in a listview.

For now only Education_form and household_member of household have been removed .

manually hide subforms w.r.t positions in  a listview.
@odk-x-bot
Copy link
Copy Markdown

Can one of the admins verify this patch? Also need an authorization to run tests.

@sanyud24
Copy link
Copy Markdown
Author

I'll be experimenting more on this issue with json files , after my university endsem exams. If this method seems right ,I will add label to show hidden forms . I tried hiding using table_id but table_id can only be accessed after clicking on the list , so to remove subforms using tableid or form_id etc. user have to click on the forms one by one . So most easiest way was to store the position manually and remove em all together .

@wbrunette
Copy link
Copy Markdown
Member

runtests

@wbrunette
Copy link
Copy Markdown
Member

@sanyud24 you should use the form Id as there can be multiple forms for a single table.

Copy link
Copy Markdown
Member

@wbrunette wbrunette left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sanyud24 a "manual" solution to hiding forms cannot be written it java code. It needs to be configurable by a deployment architect. As suggested in the issue, maybe have a field on the settings page that then gets checked when creating the list of forms.

@sanyud24
Copy link
Copy Markdown
Author

This issue was not an easy win XD. I'll try it for 2 more days , if I'll be unable to figure it out then I'll have to drop this issue , Thanks a lot for the review .

@sanyud24
Copy link
Copy Markdown
Author

I'll try using formId as you said for that I'll make a HashMap containing formid's and a boolean value to hide and show subform. I'll try approaching this issue like this .

@wbrunette
Copy link
Copy Markdown
Member

@sanyud24 I agree this is not an easy win, it got mislabeled. Apologies. The mentors are aware that some contributions are more difficult than others.

Survey is using Content Provider from ODK-X Services to get it's list of forms. The actually query for the forms list is done in Services. To complete this you would need to modify the query.
https://github.com/odk-x/services/blob/master/services_app/src/main/java/org/opendatakit/services/forms/provider/FormsProvider.java

A "Content Provider" is an Android construct.

Again I agree this is not a simple issue.

@sanyud24
Copy link
Copy Markdown
Author

Thanks a lot I've been looking for the file , I'll try doing it .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants