These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Hide a button that is on a repeating subform

suewhitehead
Registered: Jun 3 2008
Posts: 232
Answered

I have a subform named ItemSet with a button on it named RemoveLineBtn.

I want to make another button on the main subform (P1) that will hide the RemoveLineBtn buttons. I can't seem to get the reference right. I know I need to use presence = "invisible".

How can I do this?

My Product Information:
LiveCycle Designer, Windows
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
Maybe a solution for you.

I was looking for the same for hiding button on maser pages and found a solution for this.
You will have to modify the script a bit, but mainly it should be the same.

http://www.acrobatusers.com/forums/aucbb/viewtopic.php?id=18739

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs

suewhitehead
Registered: Jun 3 2008
Posts: 232
Didn't help. Maybe I'm not as good with Livecycle stuff as you are. It only removes the first 2 buttons on the subform. I need it to remove all instances of the button, and I have the form set to have 8 repeating subforms on itialization, with more possibly added by the user.

I think I need to use [*] somewhere, but I am having trouble figuring it out. Any other ideas?
suewhitehead
Registered: Jun 3 2008
Posts: 232
I finally got it in FormCalc. It is
xfa.form.form1.P1.ItemSet[*].RemoveLineBtn.presence = "invisible"

I never have been able to get the Javascript version, though. Can anyone tell me how that would be translated to javascript? I really want to know this just as a learning experience so I will know how to reference a field on a repeating form on future forms. Thanks.