Hi All, Been scouring looking for an answer to this, and tried several things that I haven't been able to make work for me.
I'm creating a quote form in LC Designer.
I've got buttons to add or remove instances of a subform. The subform contains 5 fields. I need to add a checkbox that will hide only 2 of the fields within the subform when checked, and when unchecked, show them again. I am able to make this work, but only for the first instance (instance 0?). How can I make this work so it hides these fields from each of the visible instances?
You can view the form at: https://workspaces.acrobat.com/?d=GVqRa5BfyIKxpkAVBxje3Q
For anyone that is feeling abitous, what I really wanted to do seems impossible, so I'm going with the above as a simpler workaround. What I really want to do is have a check box that when clicked, will hide the quotation form, and make the purchase order visible, carrying over any field data into a new table on the Purchase order form from the quote form. I've attached this form at https://workspaces.acrobat.com/?d=pqpsXx5VPi*LkMeVKrX57w
I understand that I need to create an XML schema to accomplish this, but can't figure out for the life of me how to actually create the schema. I can only find info on how to bind the data source once it's been created.
I would be forever grateful to get a hand with getting either of these forms to do what I need.
Hi Bruce, Sorry about that. I have published the files at both the links. I tested to make sure they work as well. I can't see them in my browser unless I download them to my computer for some reason though.
Thanks in advance for any help you can provide.
The first question is fairly easy, you need do exactly what you were doing but for all the rows, so;
var newPresence = (this.rawValue == "1") ? "hidden" : "visible";
var rows = page1.resolveNodes("Subform2[*]");
for (var i = 0; i < rows.length; i++)
var row = rows.item(i);
row.Col2.presence = newPresence;
row.Col4.presence = newPresence;
The second one can be done, but is a bit fiddly. I have updated your sample, https://workspaces.acrobat.com/?d=jLYZGae--BiZ0khRbZqvuA
This relies on having two top level subforms, one for Sales_Quotation and one for Purchase_Order, when you click the checkbox the name of the top element in your data connection is updated, the form is remerged and rendered with the top level subform that matches the new name. Look in the hierarchy tab and you will see what I mean by top level subform. Any elements that have the same binding under the Sales_Quotation and Purchase_Order subforms will bind correctly. You wont need an XML Schema.
The fiddly bit is that in Designer you can only edit the first top level subform in the form, the second one wont show up at all at design time. However, the approach was discribed in this blog http://blogs.adobe.com/formfeed/2011/02/multiple-top-level-subforms.html and John has a macro to move the first subform become the last. I've already run the first macro, NewTopSubform, so you just need the RotateSubforms macro. There's more information on macros and how to install them in the Designer help http://help.adobe.com/en_US/enterpriseplatform/10.0/DesignerHelp/WS3041177a02dcf48e2f8c933d12daa5a53...
Wow, I can't thank you enough for all this information, Bruce. much appreciated. I'm going to read the info at these links you've provided, and see if I'm not trying to bite off more than I can chew...I may be back with more questions, hopefully you will be nearby!