Hi - I was wondering if there's any way to change the tab order on a form within a model driven app? Right now within a section if there are multiple columns it goes down column 1 then to column 2, down column 2 then to column 3, etc. Is there anyway to make the tab order go Column 1A, Column 2A, Column 3A, Column 1B, Column 2B, etc? Maybe is there isn't a built in way there's a way to do it with javascript? Thanks for the help!
Also, the field that you use for this does not have to remain visible or store any data. So, I created a new text field in my Dataverse table named "Horizontal Tab Order" which I now add to every section that I want to have row-based tab movement, instead of the default column-based tab movement. Then, I hide that field on the form. Easy fix, not found in Microsoft docs. Thanks again, Mosied, for the tip.
Thank you Mosied!! This tip/trick/workaround actually does work perfectly for my scenario as well. And, I was trying to troubleshoot/modify the JavaScript, all to no avail.
This actually works!
Not sure if this is by design or not, but if you expand the column width of a field in a section from one column to multiple columns, the tab order for that section changes from column-based to row-based.
Hi@PowerPuffKK - thanks for the response! I tried the code, but I am getting cannot read property of null error even though I am putting in a catch for it. Any suggestions? Have you used the below code successfully to change the tab order? Thanks again for the help
Hi @cwwhite1 ,
Unfortunately at present, there is no way to adjust the tab order through the UI - it goes in the logical order top to bottom, left to right.
You can try overwriting it using Javascript, here's a sample code snippet you could use:
function LefttoRight() {
for (var i = 0; i < Xrm.Page.ui.controls.getLength() ; i++) {
var control = Xrm.Page.ui.controls.get(i);
var element = document.getElementById(control.getName());
if (element.tabIndex && element.tabIndex != "0") {
if (element.className == 'ms-crm-Hidden-NoBehavior')
continue;
if (element.tagName == 'A') {
if (element.className != 'ms-crm-InlineTabHeaderText')
continue;
}
element.tabIndex = 1000 + (i * 10);
}
}
If this answers your question, please mark it as a solution to help future visitors.
Kristine 😊
mmbr1606
22
Super User 2025 Season 1
stampcoin
17
Michael E. Gernaey
15
Super User 2025 Season 1