Scroll too long when using nested dynamic panels

Stacey Rogers shared this question 4 years ago
Answered

Im setting up a form which has a number of conditional aspects - i.e. if answer "yes" to a question see one set of questions, if "No" see another.


There are more than one sets of these questions with the overall set of questions.


The user should only see the questions which are relevant to their selection, so the form has a lot of 'show/hide' type scenarios.


The form is also on a mobile device, therefore a scroll is required to allow for the screen.


I have set this up as follows (simplified):


Master_DyP


> DyPanel_1


> Question 1


>> DyPanel_2


> Blank_Panel_2A


> Questions_2B_panel


> Questions_2C_Panel


>>> DyPanel_3


> Blank_Panel_3A


> Questions_3B_panel


> Questions_3C_panel


The Master panel is set to the height of the screen and autoscroll selected


DyPanel_1 is set to a height which accommodates DyPanel_2 and DyPanel_3 (which are nested in this panel)


DyPanel_2 is set to a height which accommodates Panel_2B and 2C and DyPanel_3 (which is nested in DyP_2), Blank_2A is set at a height of 0 and selected as default


DyPanel_3 is set to a height which accommodates Panel_3B and 3C, Blank_3A is set at a height of 0 and selected as default


Events are set on widgets in the questions to show/hide the appropriate panels


I am able to see the panels fine but the problem I have is that the scroll is HUGE and it looks wierd to the user if they go down one of the routes which doesnt need all of the space - i.e. even before the user answers any question they are able to scroll the screen to the bottom of where the longest responses would be positioned.


This looks odd


My question is


a) is this the best way to do this?


b) is there a way to control the scroll better such that the area the user can scroll the main screen to is just to the bottom of the content they can see at that time?


Apologies for the length of this - a diagram is also attached which should explain simpler fde1983ab71874ec0a0e4585aea9a05e

Comments (2)

photo
1

I think the problem is with the Dynamic Panel 1. I think you can make it work if you make Dynamic panel 1 as long as the screen and, in Properties, activate the vertical scroll for Dynamic panel 1.


Also, these two tutorials might help you understand how 'layouts' work in dynamic panels to collapse or expand content:


http://www.justinmind.com/support/dyn...


http://www.justinmind.com/support/exp...

photo
1

Thanks - Ill take a look at the second tutorial - Ive seen the first one and its a little too simplistic for what I need ... If it actually showed you had to build the form it shows as its base example however it would be ACE!


;-)