It's possible, but it would require using a script, as you'll need to keep track of which fields are currently visible and which ones are not.
1 person found this helpful
I could have sworn I already answered this yesterday. Maybe this is a re-post to another topic? Anyway, here is may answer
Yes, this is possible. The fields need to be named in such a way that the blocks are grouped for hiding and showing, and for determining order of visibility. For example, Block1.dimension, Block1.method etc.
Now this code will show all fields in block 1
this.getField("Block1").hidden = false;
Keep track of the sequence by looking at which blocks are hidden or shown.
If there are page graphics and text involved, it gets more difficult. The only way to hide/show page content is with OCGs, also called layers. There are a number of preflight tools for attaching content and fields to OCG layers (which is actually another way to show/hide form fields). There are also ways to build a page by combining multiple pages, with each placed on a different OCG layer.
Is it possible to use that code this.getField("Block1").hidden = false; multiple times on the same button to make it so that each sequential click will hide/show the next block ?
Yes, this can be done, as I've described in the previous response. The key is keeping track of what's visible, as both try and I have stated
There's a couple of ways to do this. Here's an easy one.
1. Put a hidden text field on the form named "SeqNum". Default it to a value of 1.
2. Put this code in the button that shows the blocks
var nNum = ++this.getField("SeqNum").value;
if(nNum < 6)
this.getField("Block" + nNum).hidden = false;
This code handles up to 5 blocks.
Would the similar code (but changed to subtract sequence numbers) under the "Remove Sequence" button work in tandem? So that let's say I've added up to Block 5, and clicking the Remove Sequence button once will now only show the top 4 blocks?
Yes, just change the "++" to "--", and the if to (nNum > 0)