OK. This can be done fairly easily if yuo use a hierarchical naming system for you form fields. For example, prefix all of your fields in section 1 with "S1.", tso they have names like: "S1.cust_name", "S1.address", "S1.city", etc. You can then hide all of the fields in a group with a single line of JavaScript:
// Hide all of the secition 1 fields
getField("S1").display = display.hidden;
If you include an opaque button to cover all of the section (e.g., set the background to white and make it read-only), you can hide the underlying page contents by doing:
// Show the section 1 button
getField("S1_cover").display = display.visible;
In this case don't include the "S1." prefix.
Do the same type of thing for the other sections. You can then set up a general function in a document-level JavaScript to show/hide any section, something like:
function hideFormSection(section, hide) {
// Determine whether to show or hide the fields
var disp = hide ? display.hidden : display.visible;
// Dtermine whether to show of hide the cover button
var disp_cover = hide ? display.visible : display.hidden;
// Show/Hide the fields
getField(section).display = disp;
// Show/Hide the cover button
// Each section cover button is named: prefix + "_cover". Example: "S1_cover"
getField(section + "_cover").display = disp_cover;
}
And you could call it like this:
// Hide section 1
hideFormSection("S1", true);
// Show section 3
hideFormSection("S3", false);