Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data capture, Submit questionnaire button at the bottom of the questionnaire (paginated and default) #1088

Closed
santosh-pingle opened this issue Jan 28, 2022 · 4 comments · Fixed by #1201
Assignees
Labels
effort:small Small effort - 2 days P1 High priority issue type:enhancement New feature or request

Comments

@santosh-pingle
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

  • Every questionnaire has a submit button at the end of the questionnaire (only on last page if it paginated)
  • Dev can customize it by making it “gone”. Custom style attributes
  • Part of data capture library

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Would you like to work on the issue?
Please state if this issue should be assigned to you or who you think could help to solve this issue.

@santosh-pingle
Copy link
Collaborator Author

santosh-pingle commented Feb 23, 2022

  • Default Layout, show Submit questionnaire button at the bottom of the page when form scrolls reach the bottom end.
    Approach :
    Add the submit button at the bottom of the parent with constraint layout constraints in questionnaire fragment xml layout.
    Initially it will be gone/invisible.
    There is no specific scrolling event which tells that scroll reach at the end. Either you have to use OnScrollListener of recyclerView and check last item is visible to show a submit questionnaire button.
    Or use QuestionnaireAdapter onBindviewHolder to get current position of an item and check if given position is last item and update submit questionnaire visibility in fragment.

@santosh-pingle
Copy link
Collaborator Author

  • Pagination Layout, show submit button on last page where Next button is shown originally.
    Approach :
    If layout is pagination layout then clear default layout submit button constraints, and add constraint so that it will be shown at the place of Next button, once there is no next state/page then make it Submit questionnaire button visible and next button gone/invisible, and vice versa.

@santosh-pingle
Copy link
Collaborator Author

  • when Submit questionnaire button visibility declared as gone in custom style in catalog app
Screen.Recording.2022-02-25.at.6.16.39.PM.mov
  • by default submit questionnaire button visibility is visible and only visible when scroll reach at the bottom of the page in default layout and on last page when layout is paginated.
Screen.Recording.2022-02-25.at.6.20.32.PM.mov

@santosh-pingle
Copy link
Collaborator Author

@jingtang10 @shelaghm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort:small Small effort - 2 days P1 High priority issue type:enhancement New feature or request
Projects
Archived in project
Data capture library
  
In progress
Development

Successfully merging a pull request may close this issue.

3 participants