cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cwwhite1
Helper I
Helper I

Model Driven App Tab Order

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!

1 ACCEPTED SOLUTION

Accepted Solutions
PowerPuffKK
Resolver IV
Resolver IV

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 😊

View solution in original post

2 REPLIES 2
PowerPuffKK
Resolver IV
Resolver IV

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 😊

cwwhite1
Helper I
Helper I

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

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Users online (4,117)