Expand my Community achievements bar.

SOLVED

Require a field and tab order based on another field

Avatar

Level 2

It seems like this should be possible, but I can't find any information.  Maybe I am not asking the question correctly.

Based upon my attached document if the fee type of CPFF is selected then I want the tab order to move to the Project Cost field and all fields to the right.

These fields should only be required if the fee type of CPFF is chosen.  If any other fee type is chosen then the tab order should move to the next field.

Also is possible to turn off tabbing on title fields like Fee Type, Project Cost, etc?

Thank you!

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

I believe when you say tab order you mean both focus and access.

The code below, attached to the exit event of the drop-down, checks if "CPFF - Cost Plus Fixed Fee" was NOT selected. If it was not selected I change the access property of ProjCost, FixedFee and Total to "readOnly" and set the focus to TextField1. Otherwise, tab order is enforced and ProjCost, FixedFee and Total are made user entered - optional by setting the access property to "".

// form1.#subform[0].Table3.Row1.DropDownList1::exit - (JavaScript, client)

if (this.rawValue != "CPFF - Cost Plus Fixed Fee") {

     Table3.Row1.ProjCost.access = "readOnly";

     Table3.Row1.FixedFee.access = "readOnly";

     Table3.Row1.Total.access = "readOnly";

     xfa.host.setFocus(TextField1);

}

else {

     Table3.Row1.ProjCost.access = "";

     Table3.Row1.FixedFee.access = "";

     Table3.Row1.Total.access = "";

}

Steve

View solution in original post

1 Reply

Avatar

Correct answer by
Former Community Member

I believe when you say tab order you mean both focus and access.

The code below, attached to the exit event of the drop-down, checks if "CPFF - Cost Plus Fixed Fee" was NOT selected. If it was not selected I change the access property of ProjCost, FixedFee and Total to "readOnly" and set the focus to TextField1. Otherwise, tab order is enforced and ProjCost, FixedFee and Total are made user entered - optional by setting the access property to "".

// form1.#subform[0].Table3.Row1.DropDownList1::exit - (JavaScript, client)

if (this.rawValue != "CPFF - Cost Plus Fixed Fee") {

     Table3.Row1.ProjCost.access = "readOnly";

     Table3.Row1.FixedFee.access = "readOnly";

     Table3.Row1.Total.access = "readOnly";

     xfa.host.setFocus(TextField1);

}

else {

     Table3.Row1.ProjCost.access = "";

     Table3.Row1.FixedFee.access = "";

     Table3.Row1.Total.access = "";

}

Steve

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----