Expand my Community achievements bar.

When selecting a new drop down value, the new selection does not show.

Avatar

Level 1

I am using LiveCycle Designer 8.0.  I am working on a form that expands up to 7 pages depending on a user's answers to various questions. I have a simple two-option drop down with values of YES and NO.  Each selection causes a specific text (YesAnswer or NoAnswer) to become visible and hides the other text.

The problem is when a user selects "NO" then selects "YES", the appropriate text becomes visible and the rawValue is updated, but sometimes the displayed selection in the drop down box itself does not change to "YES".  If the user then selects "NO" again, then the displayed selection in the drop down box changes to "NO".

This error does not occur for all of my YES/NO drop down lists.  I finally pinpointed the error to situations where a change from the NoAnswer text to the YesAnswer text shortens the overall form page count.  The text associated with "NO" is pretty long so this situation arises in most instances where a user selects NO then YES

How do I get the correct current value of the drop down list to be visible even when the overall page count is shortened

This is the FORMCALC script I have inserted in the Change event.

if (xfa.event.newText == "YES") then

   xfa.form.form1.YesAnswer.presence = "visible";

   xfa.form.form1.NoAnswer.presence = "hidden";

elseif (xfa.event.newText == "NO") then

   xfa.form.form1.YesAnswer.presence = "hidden";

   xfa.form.form1.NoAnswer.presence = "visible";

endif

In the Initialize event I set both YesAnswer and NoAnswer presence to "hidden".

Message was edited by: jnp_lc

4 Replies

Avatar

Level 10

I do not see anything wrong in your code. But the condition is looking for the selected value as YES/ NO.. You should be having the same case for each of the Dropdown value.

If you can, send the form to LiveCycle9@gmail.com, so I can have a look at it. Please mention where the problem is.

Thanks

Srini

Avatar

Level 1

Srini,

I sent you a sample form containing 2 questions.  The 1st question has no problem with changing the selected value.  The 2nd question demonstrates the problem.

For anyone else trying to duplicate the problem using the code in my original entry, use the following text.

For YesAnswer:

"Yes"

For NoAnswer:  (I am using the default font from LiveCycle - Myriad Pro size 10)

"No

2

3

4

5

6

7

8

9

10

1

2

3

4

5

6

7

8

9

20

1

2

3

4

5

6

7

8

9

30

1

2

3

4

5

6

7

8

9

40

1

2

3

4

5

6

7

8

9

50

1

2

3

4

5

6

7

8

9

No"

Avatar

Level 10

John,

        I had looked at your form and may be I am missing some thing on the actual problem..

        In the second dropdown, I changed the selections multiple times to NO and YES and it seems to be working fine..

        When I choose No, PDF displays a No text and adds an other page. If I change it to Yes, then Yes text will be displayed and it removes the additional page. In both the scenarios, I see the value of the dropdown to have the same text I selected.

        Am I missing something that you have issue and I am not?

        Please explain..

Thanks

Srini  

Avatar

Level 1

Srini,

I just checked the same form that I sent and had the same problem as before... I'll send you a print out.

What version of LiveCycle are you running?  I am running LiveCycle Designer 8.0.  The form was saved as an Acrobat XML (Dynamic) 8.0 file.

John