[Resolved] Dont Scroll after Form Update

    • September 23, 2022 at 12:17 am #11687
      B
      QFM
      Participant

      Hey,

      we work with a lot of Forms inside a Ticket to keep everything sorted. As you work through the form you always need to save after you enter some information or ticking a checkbox. If you click on the Green Button for saving, the Formfield gets filled out and the Ticket gets Refreshed to show the newly entered information. After its refreshed you are on Top of the page. Now, you need to Scroll down again and find the Next Field. Then its starts over again.

      Maybe my question is not completely right in this forum, and belongs more to osticket itself, but i thought i give it a try:

      Is there any possibility to prevent this “Scroll to Top” Behaviour? 

      If you refresh the Page with F5 (or Browser Button), it will stay on the exact same spot. So it seems possible to keep the focus on the fields after a refresh. But the Function which does the Refresh after a field entry seems to work different. Do you know which File contains the Function behind that Button? 

      Every Hint would be much appreciated. Thank you in advance.

    • October 8, 2022 at 10:25 pm #12010
      stevland
      Keymaster

      I’m pretty sure that this is a technical limitation of PHP.

      I’ve heard that other programing languages, such as Ajax, allow the user to submit form data without a page refresh.

      In order to achieve the behavior you want you would have to modify the osTicket source code.

      It is way beyond the support I can offer, but it is an interesting question and I think I found the solution.

      You would need to do something like this:

      https://stackoverflow.com/questions/11950509/is-it-possible-not-to-jump-to-the-top-of-the-page-on-form-submit

      I hope this helps.

You must be logged in to reply to this topic.