Forum Discussion
MichaelHalbrein
7 years agoQrew Cadet
having trouble getting image uploaded. to try to describe the scenario ... on tab 1, the button sits at the bottom of the form from the beginning (e.g. it is always shown). The user answers multiple questions on the form. The last MC question (Yes or No) sits just above the button. If the user selects yes, the 2nd tab shows up (the 2nd tab is otherwise hidden). The 2nd tab is hidden from the start and only shows when Yes is selected to that question. If the user selects No then it remains hidden. In this latter scenario, the button, when clicked, should go to the 3rd tab that is always shown. I hope this helps?!
- AlexWilkinson7 years agoQrew Assistant CaptainVery helpful. I was able to create a test form (modified from one of my production apps) with settings that exactly match those you described. And, yes, the test form reproduced exactly the behavior you described. I'd like your scenario to work for my own apps, so I will start debugging the test form. I'll post a solution here, if I am able to find one.
- AlexWilkinson7 years agoQrew Assistant CaptainModifying just the first line of the script seems to solve the problem. Here's the full script:
var nextTabLink=$("li.ui-tabs-selected").nextAll(":visible").children("a:first");
$("#saveAndKeepWorkingMenuOption").click();
var noErrorDialog=$('#qbDialog').length==0;
if( noErrorDialog ){
$(nextTabLink).click();
location.assign("#mainBodyDiv");
};