Skip to main content
Participating Frequently
February 8, 2019
Question

Read only Text Field becomes focused and tabs back to the first field in the tab order

  • February 8, 2019
  • 1 reply
  • 512 views

I have a Text field that has this validation script:

this.getField("CREDITRow1").readonly= (Number(event.value)>0);

When you enter a value you in the field and click tab it goes to the next field, which is the field that becomes read only. If you then tab from that field it tabs to the first field in the tab order instead of the next field in the tab order.

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
February 8, 2019

What's the name of the field after CREDITRow1 in the tab-order?

Participating Frequently
February 8, 2019

LINE DESCRIPTIONRow1

try67
Community Expert
Community Expert
February 8, 2019

Try this, then:

if (Number(event.value)>0) {

    this.getField("CREDITRow1").readonly=true;

    this.getField("LINE DESCRIPTIONRow1").setFocus();

} else {

    this.getField("CREDITRow1").readonly=false;

    this.getField("CREDITRow1").setFocus();

}