Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Problem with scrollbar

Avatar

Level 1

I have created a multiple page form, with the first page being used to collect data from the user which is used to complete the subsequent sub-forms and then print them as documents.  On the first page which is used for data entry, I have created a PREVIEW button which I initially placed at the bottom of the page. The PREVIEW button displays the PDF documents which are completed once the data entry is completed.  The problem is that when the PREVIEW button is at the bottom of the page, when I display the completed PDF documents, the scroll bar initially displays the PREVIEW documents half way down the screen and the user needs to scroll up to see the beginning of the document.  After much trial and error, I discovered that the problem is due to the fact that the user has to scroll down to complete the data entry page and apparrently the scroll position is maintained when I display the first PREVIEW page.  I was able to get around the issue by moving the PREVIEW button to the top of the page, but from a usability perspective, this is less than ideal.

So, the question is.......is there a way to force the PREVIEW pages (basically just unhiding completed subforms) to be displayed starting at the top of the form when the previous page has been scrolled down?

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

What if you programatically moved the cursor to a field at th etop of the form beofre doing the preview?

xfa.host.setFocus("FieldName to set focus into")

View solution in original post

2 Replies

Avatar

Correct answer by
Former Community Member

What if you programatically moved the cursor to a field at th etop of the form beofre doing the preview?

xfa.host.setFocus("FieldName to set focus into")

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----