Expand my Community achievements bar.

creating subforms

Avatar

Level 2

I wonder if someone might be able to assist me with subforms within Adobe LiveCycle designer?

My scenario:

I am in the process of developing a new PDF document this is the first time i have used subforms which contain additional details. I have a pick list box which i have added some script to that says when a particular value is selected open subform however if its not a certain value keep the subform invisible.

for example:

If someone selects the code TXS it will open the subform

If someone selects TRD it will keep the subform invisible.

What I would like to be able to do is continue to add in my fields over the top of this subform so that if someone selects TRD the form continues to flow. However if someone selects TXS to open the additional questions it will move the other fields down a page.

Any help anyone can give would be great!!!

4 Replies

Avatar

Level 7

Make sure your containing page is set to "Flowed." Then this code worked for me on the list box:

lbPick::exit

if (this.rawValue == "TXS") sfTXS.presence = "visible";

else sfTXS.presence = "hidden";

Of course, I don't know what you called your subforms, but if you change the code to match the name, this should work.

Message was edited by: jasotastic81 inadvertently suggested changing the names in the form...

Avatar

Level 2

Hi jasotastic81

I have tried your suggestion and its still not working, the current formula i have my pick list is:

 

switch(this.boundItem(xfa.event.newText)){

case"TXS":

  Subform1.presence="visible";

  break;

default:

  Subform1.presence="hidden";

  break;

}

This is something our IT department helped me with but unfortunately none of them have any idea how to use Livecycle so this is certainly a 'teach yourself' internal program.

I set the subform object to flowed and added a few extra fields below the subform, ran the preview and Livecycle crashed.

Any ideas? sorry to be a pain but first time i've used subforms and as above no one else in our company knows anything about this program.

Thanks

Avatar

Level 7

I set the switch statement to switch(this.rawValue), and it worked for me. Since for me, it's on the exit event, I had to click outside (or tab out) of the pick list, and it made the subform disappear/reappear.

Avatar

Level 2

Hi  jasotastic81

Im still having problems....... the second pick list in my form is working perfectly but the first pick list isn't working with the same formula or amending it to 'this.rawValue".

Im starting to wonder if im trying to do something that LiveCycle just cant cope with, the things im trying to do is:

  1. Hide sub forms in the background but when a certain item in a pick list is selected the sub form opens moving the rest of the document down a page
  2. Have 2 pick lists working with different sub forms
  3. The newest problem is when I preview the document a message is appearing at the top which says:

"Please fill out the following form. You cannot save data typed into this form. Please print your completed form if you would like a copy for your records"

Is this normal, i have amended the options menu to pick up Adobe reader version 9 or later....

You seem to have a lot of experience with this software is it something i could send to you to have a look for me?

Many thanks for all of your advice previously, very much appreciated!!!