Expand my Community achievements bar.

Suppress fields based on values

Avatar

Level 1

Hi, I am trying to create an expense report in livecycle where if someone selects from a drop

down, based on the result picked, it would show a different field to fill in.  If they don't pick a specific dropdown that has extra fields, then those fields stay hidden.

For example, if they pick "mileage" from the dropdown, it will show a field to put in the mileage and then the total would show the qty * mileage rate.

If they pick "meeting", it would show a field to put in the description of meeting and another field to put in attendees.

I'm not sure how to do "hidden" fields.  I know how to do suppression formulas in crystal but don't see that as an option with livecycle.  Please help!

1 Reply

Avatar

Level 10

Hi,

First off, there is an example here which goes through the scripting method of changing an object's presence: http://assure.ly/h7whb8.

The easiest way may be to group the objects for each category of the dropdown into subforms and then show and hide the subforms as necessary.

For example the following in the exit event of the dropdown:

// hide all subforms

travelSF.presence = hidden;

meetingSF.presence = hidden;

// check the value of the dropdown and show the appropriate subform

switch (this.rawValue)

{

     case "Mileage":

     travelSF.presence = "visible";

     break;

     case "Meeting":

     meetingSF.presence = "visible";

     break;

}

Now a lot depends on whether you are using repeating objects in a flowed layout, where the user can add more rows. IF so you may need a more detailed solution.

Hopefully this will give you a start,

Niall