I have a form where there are subforms hidden until a box is checked. Is there a way for the user to print out the entire form before they answer any questions? Do I just need to write a code and put a button in for printing? I'm looking for a way to expand all the questions without clicking any checkboxes. (Hopefully this explains what I'm looking for.)
Thanks in advance.
Rose.
Views
Replies
Total Likes
Write code in the prePrint event of the Print button on your form to set the presence property of all the subforms to "visible";
Thanks
Srini
I'm newer to coding. Is there something that can change all subforms at once? Or do I need to write a line of code for each subform?
Views
Replies
Total Likes
Use the below code to loop thru all the pages in your PDF and then all the subforms in each page and set their presence to visible..
try{
// Get the Subform containers from each page.
for (var i = 0; i < xfa.layout.absPageCount(); i++) {
var oSubforms = xfa.layout.pageContent(i, "subform",0);
var nodesLength = oSubforms.length;
// Set the access type.
for (var j = 0; j < nodesLength; j++) {
var oItem = oSubforms.item(j);
oItem.presence = "visible";
}
}
}catch(e){
app.alert("Error in enabling the Subforms - " + e);
}
Let me know if this helps..
Thanks
Srini
Views
Replies
Total Likes
Views
Likes
Replies