Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Comb of (number) character ...

Avatar

Level 2

I am a beginner in Adobe LiveCycle application, and I apologize for any confusion, but if someone can help, how to make a dynamic form, with the following elements (the IBAN account):

     1. Drop down list with name of state (Albania, Andora, ...)

     2. text field with : 2 character of state (ex. Albania = 'AL',  Andora = 'AN', ...)  + variable number characters of each state comb of (number) character (ex. Albania 28, Andora 24, ...)

So, can something like:

if(DropDownList2 == "Albanija")

          {

               this.numericField3.ui.numericEdit.comb.numberOfCells = "28"

          }    

elseif (DropDownList2 == "Andora")

          {

               this.numericField3.ui.numericEdit.comb.numberOfCells = "24"

          }

.....

endif;

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

Is the form saved as a dynamic?

The following works in the attached.

// form1.page1.subform1.dd::exit - (JavaScript, client)

var str = this.rawValue;

switch (str) {

          case "A":

    form1.page1.subform1.resolveNode("tf.ui.#textEdit.comb").numberOfCells = "9";

    break;

          case "B":

    form1.page1.subform1.resolveNode("tf.ui.#textEdit.comb").numberOfCells = "8";

    break;

          case "C":

    form1.page1.subform1.resolveNode("tf.ui.#textEdit.comb").numberOfCells = "7";

    break;

          default:

    form1.page1.subform1.resolveNode("tf.ui.#textEdit.comb").numberOfCells = "10";

    break;

}

Steve

View solution in original post

8 Replies

Avatar

Level 10

Add the following code to EXIT event of your drop-down list.

Assuming that the second field value is NumericField1

Nith

Avatar

Level 2

Thanks but Dont work !

Always display only 6 characters ... That is perhaps a problem in the EXIT event?

Is it possible to do something like:

If we have 24 fields (comb of character) (for Andorra IBAN account) to display the size of the field as a 24x0.2 ... ? where the field width is 0.2 character

Avatar

Correct answer by
Former Community Member

Is the form saved as a dynamic?

The following works in the attached.

// form1.page1.subform1.dd::exit - (JavaScript, client)

var str = this.rawValue;

switch (str) {

          case "A":

    form1.page1.subform1.resolveNode("tf.ui.#textEdit.comb").numberOfCells = "9";

    break;

          case "B":

    form1.page1.subform1.resolveNode("tf.ui.#textEdit.comb").numberOfCells = "8";

    break;

          case "C":

    form1.page1.subform1.resolveNode("tf.ui.#textEdit.comb").numberOfCells = "7";

    break;

          default:

    form1.page1.subform1.resolveNode("tf.ui.#textEdit.comb").numberOfCells = "10";

    break;

}

Steve

Avatar

Level 2

Thanks.

Whether you can send mail to see this example?

Something changed and I still is not working ...

Avatar

Former Community Member

Note the space introduced into "numberOfCell s" by cut-and-paste.

Steve

Avatar

Level 10

Send your form to nith.mof@gmail.com

I will try to resolve the issue.

Nith

Avatar

Level 2

We are sorry that due to health problems before I could get advice and help solve this problem. Here is something I made, so please advice whether it is wrong, and that if we are able to provide advice on the first three text fields, which may begin with a zero, so that they Formatting ...

It is also not clear to me why DDlist when we change the value after a few choices not display all the fields?

In any case, thank you for the advice and recommendation that you gave me ..

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] ----