Expand my Community achievements bar.

SOLVED

livecycle hide empty fields

Avatar

Level 2

Hi,

   I have a form in which i have 10 rows of categories, and each category has 4 replicate dropdownlists (in case user wants to select more than one option). My question is how do i get the extra dropdownlists to automatically hide if lets say they select something from the first two dropdownlists, but the last 2 are left blank? right now i have the default value of the list as a blank space and my exit event formcalc script is:

if

(DropDownList1[1].rawValue >= "1")

then

form1.page1.DropDownList1[1].presence

= "visible"

else

form1.page1.DropDownList1[1].presence

= "hidden"

Endif

If untouched, the lists still appear as blank and are visible when printed. But if i manually select the blank option the list dissapears, but i want them to automatically dissapear when printed if nothing is selected or touched?

1 Accepted Solution

Avatar

Correct answer by
Level 7

Hi,

Not sure what your asking exactly--however, you probably be using the prePrint and/or postPrint events with the

Reference_Syntax.relevant = "+print | -print"

  • +print (default for visible objects)

Forces a particular object to appear when the form is printed, regardless of  the object's presence property setting.

  • -print (default for invisible or hidden objects)

Forces an object not to appear when the form is printed, regardless of the  object's presence property setting.

------------------------------------------------

//On an object's prePrint put the following

     if(DropDownList1[1].rawValue >= "1") then

          form1.page1.DropDownList1[1].relevant ="+print" // sets to printable

     else

          form1.page1.DropDownList1[1].relevant ="-print" // sets to non-printable

     endif

------------------------------------------------

//On an object's postPrint put the following:

     form1.page1.DropDownList1[1].relevant ="+print"  // resets to printable

------------------------------------------------

You could use "presence" property instead on the prePrint/postPrint events and accomplish the same thing. It's really the events that are the key.

Keep in mind, I'm not really sure what it is you are trying to accomplish.

Good luck!

Stephen

View solution in original post

2 Replies

Avatar

Correct answer by
Level 7

Hi,

Not sure what your asking exactly--however, you probably be using the prePrint and/or postPrint events with the

Reference_Syntax.relevant = "+print | -print"

  • +print (default for visible objects)

Forces a particular object to appear when the form is printed, regardless of  the object's presence property setting.

  • -print (default for invisible or hidden objects)

Forces an object not to appear when the form is printed, regardless of the  object's presence property setting.

------------------------------------------------

//On an object's prePrint put the following

     if(DropDownList1[1].rawValue >= "1") then

          form1.page1.DropDownList1[1].relevant ="+print" // sets to printable

     else

          form1.page1.DropDownList1[1].relevant ="-print" // sets to non-printable

     endif

------------------------------------------------

//On an object's postPrint put the following:

     form1.page1.DropDownList1[1].relevant ="+print"  // resets to printable

------------------------------------------------

You could use "presence" property instead on the prePrint/postPrint events and accomplish the same thing. It's really the events that are the key.

Keep in mind, I'm not really sure what it is you are trying to accomplish.

Good luck!

Stephen

Avatar

Level 2

Thanks so much for the quick reply and help! Awesome, it works perfectly