How to disable form focus for a specific form?

MG Casey
Mega Sage

OK I know there is a system property to disable form focus:

http://wiki.servicenow.com/index.php?title=Modifying_Form_Focus

However, I don't want to disable it for my entire instance, just a specific form. (I'd like users to be able to scroll immediately upon loading of the form without the cursor being in the first writable field.)

Any ideas?

1 ACCEPTED SOLUTION

geoffcox
Giga Guru

You can remove focus in an onLoad client script for that form (use the "blur" method).


View solution in original post

6 REPLIES 6

will_leingang
ServiceNow Employee
ServiceNow Employee

Hi MG, you can add sysparm_nofocus=true to the module url that opens that form.



Will


I have not had to edit a module URL before in ServiceNow and don't see a guide out there for it. Where would you change that so that incidents opened from a list have that in their URL automatically?



In this video I show you how to edit a module by


  1. right clicking on the navigator header "Incident"
  2. then opening the "Create New" module.
  3. And finally adding the sysparm_nofocus=true parameter to the arguments field module.


As Geoff pointed out you could also call blur on that field if you know which field you want to avoid focus... but this will instantly scroll you to the field, focus it, and then unfocus it.



You can avoid all of it using: sysparm_nofocus=true


Ah yep, that's nice, but would definitely require changing every link that comes into our incident module, which is a bit daunting. Thanks for the tip!