Place Cursor in 1st Field on a Form

Set 1st filter field in focus on a Query
July 23, 2017
Taking Control of a Form Separator – Contributed by ACDC
July 23, 2017

Again, with oodles (is that a word?) of help from support, If you put the following in a forms Initialization script, the cursor will start on the 1st field.

Bruce Lomasky

  • : v7
  • : Initialization Script
  • :

    AwareApp_FormParser.prototype.setFocus=function(sectionName) {
    if (this.m_fields ) {
    var firstTabIdx = null, focusSet = false;
    for (var i = 0, len = this.m_fields.length; i < len; ++ i) {
    var f = this.m_fields [i];
    var tabIndex = f.getTabIndex ();
    if (tabIndex && tabIndex == "1") {
    firstTabIdx = f;
    if ((! sectionName || sectionName == f.getSectionName ()) && f.setFocus ())
    focusSet = true;
    break;
    }
    }
    if (! focusSet) {
    for (var i = 0, len = this.m_fields.length; i < len; ++ i) {
    var f = this.m_fields [i];
    if (f != firstTabIdx && (! sectionName || sectionName == f.getSectionName ()) && f.setFocus ())
    break;
    }
    }
    }
    }

Customaware Systems LLC
Customaware Systems LLC
Customaware Systems LLC is a Mongolian based software development company specialising in custom web based business applications and websites.

Leave a Reply

Your email address will not be published. Required fields are marked *