Description
Index determines the tabbing sequence for each element within the crm form. When customizing new or existing entities, adding fields onto the form will skew the tabbing sequence. With minimal javascript programming, the tabbing sequence can be restored to read from left to right.
Code
/**
* Rearranges tab indexes
* @return {void}
*/
function rearrangeTabIndexes()
{
for(var i = 0; i < crmForm.all.length; i++)
{
if(crmForm.all[i].tabIndex)
{
crmForm.all[i].tabIndex = 1000 + (i * 10);
}
}
}
Examples
Click on the entity you wish to customize. From there, select "Forms and Views."
Once the new window has been displayed, double-click on "Form" and select
"Form Properties." Edit the onload event and check "Event is enabled." Lastly,
place the method signature in the textarea and save.
Event is enabled
{
rearrangeTabIndexes();
}

0 comments:
Post a Comment