0

The current behavior is that it goes to the top of the page when you change the page: https://lenkraddesign.eu/oferta/kierownice-samochodow-osobowych

Is there any way to make it scroll to the top of the form rather than page? Or alternatively stop the scrolling altogether? I don't want to use the single page layout.

1 Answer 1

0

The optimal way

I just randomly found the optimal way to do it:

  1. Go to Manage Scripts part of Breezing Forms.
  2. Switch package to FF - it's not too noticable that's there.
  3. In the following scripts: Next page, Previous page, Validate and next page and Validate previous pages change:
self.scrollTo(0, 0);

to:

element.form.scrollIntoView(true);

or anything alike. Then, as a side note, you can easily control the scroll position, if needed, with:

.bfFormDiv form {
  scroll-margin-top: 10.5em;
}

Old answer

Here's my ugly workaround - for each first input element on a page, add this Advanced -> Initscript:

function ff_gornyPasek_init(element, condition)
{
  switch (condition) {
    case 'pageentry':
      element.scrollIntoView(true);
      break;
    default:;
  }
}

where gornyPasek is the field name. If there's no input, you can add a hidden one.

If anyone has anything less abysmal without the need of doing something like this for each page, I'll gladly accept another answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.