Expand my Community achievements bar.

What is it called when a field box only generates when another field box has text entered?

Avatar

Level 1

Hi:

I am using LiveCycle Designer 8.0 and am in the process of creating a form.  I want to create a field that only will generate if a previous field has text in it.  Kinda like: if this is entered, then this will happen.  Any thoughts?

1 Reply

Avatar

Level 10

Hi,

There is a lot of potential for creating dynamic forms with LC. The help file in LC and the guides on the Adobe web site give a lot of direction.

In your first field you can write javascript against an event, in this case the exit event is probably best:

if (this.rawValue == "" || this.rawValue == null) // this is a test if the first field is empty

{

     textField2.presence = "invisible";

}

else

{

     textField2.presence = "visible";

}

When testing you use double "=="; when assigning values you use a single "=". TextField2 is there, just hidden from the user.

Good luck,

Niall