• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

Is there a way to control the focus when a form is displayed?

hdouglas

Member
I have a multi page form with some repeat groups. As you move forward through the form, when a new group (page) is displayed the browser focus jumps to the Next button.

Is there a way to force it to a particular element?
 
Not entirely trivial, but should be possible to accomplish with some jQuery in form_XX.js

As the page is divided into div's with id's starting page_0, page_1 etc., you can add the following actions to "Next" and Previous" buttons click events:

1) Loop through divs where the id contains "page_" with jQuery each function.
2) Check which one does not have "display:none" applied and focus the right "first" element with jQuery('#your-elemenr-ID').focus(); accordingly.
 
many thanks, I have managed to find a work around by carefully constructing the fields and where they are very long calc elements, using a checkbox to hide/reveal where the default is hide. This gives the user the choice and maintains the form in a more viewable state. I like your suggestion though and will give it a try, thank you.
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top