Skip to main content

Is there a way to prevent a wizard from setting the focus to the first field? Thanks!

Untested but maybe worth a try:


<br>(function(skuid){ &nbsp;&nbsp;&nbsp; &nbsp; var $ = skuid.$; skuid.$(document.body).one('pageload',function() {<br>&nbsp; &nbsp; &nbsp; $('fieldToBeGivenFocus').focus();<br>&nbsp; &nbsp;});<br>})(skuid); 

Irvin… Thanks for the reply. Maybe I’m reading this incorrectly… It looks like this will set the focus to whatever field I put in ‘fieldToBeGivenFocus’?

Unfortunately, I don’t think that helps my use case. The top of my page has a large template component with a bunch of text that the user needs to read. Right now the wizard is automatically setting the focus to the first editable field, which scrolls down that page so the user doesn’t see the text. each time a new step loads, I want to be at the top of the page.

This is the case for several steps in the wizard. Ideally, I’m looking for a way to prevent the wizard from setting the focus at all.


Any answers on this?


There is not an easy way to make the Wizard page not have any focus at all.  The only way we thought to work around this was to turn off all input fields on the page (Make field editors read/edit).  Skuid is looking for the first field in edit mode on the page to set focus on.  If there are none,  no focus will be set. 

Then you could put a button (in a page title) at the bottom of your template that says “I got it!”  and turns the components below it into Edit mode.   Look at this forum post about the code needed for that sort of button:  https://community.skuid.com/t/edit-mode-button

I know that is a work - around,  but maybe it will be sufficent.