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
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (4,388)