Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Hidden subform subform processing issue

Level 1
Level 1

Here’s my scenario: The user needs to enter data and make dropdown choices on the first page of the form (user entry point) and get back a flattened PDF showing the appropriate output based on their choices (the first page is hidden while the 2nd or 3rd pages are revealed). In addition, there are three subforms on the second page, any of which may need to be visible depending on a selection from a dropdown list.

When testing on the client side the output is correct:  two pages are hidden and a subform is hidden and made visible based on a the customers selection; the user entry point is hidden, and the correct pages and correct subform are visible. (works fine)

However, when the form is submitted to the server-side process for flattening it does not return the anticipated output. It flattens and shows the initial input screen which should be hidden; when it should show the page 2 or page 3 choices. It’s as if the changes or choices made by the user are not recognized at this point.

Can you tell me what’s missing in this code or what I have set up incorrectly?

Currently my code is set up like this.

For the client side:

data-set.MainDocument.sfCustomerEntryInfo.btnCreateForm::click - (JavaScript, client)

  1. this.resolveNode("CheckBox1").rawValue = "1";
  2. sfCustomerEntryInfo.ddlForMoreInformation.execEvent("change");
  3. this.resolveNode("sfCustomerEntryInfo").presence = "hidden";
  4. this.resolveNode("Page1").presence = "visible";
  5. this.resolveNode("Page2").presence = "visible";

For the server side:

data-set.Page2.Page2.sfimgpage2.Button1::ready:form - (JavaScript, server)

if xfa.resolveNode("data-set.MainDocument.sfCustomerEntryInfo.CheckBox1") this.rawValue = 1



    this.resolveNode("sfCustomerEntryInfo").presence = "hidden";

    this.resolveNode("sfContactYourLocal").presence = "visible";

    this.resolveNode("sfStandard").presence = "visible";

    this.resolveNode("Page1").presence = "visible";

    this.resolveNode("Page2").presence = "visible";



Thanks for your time

1 Reply
Level 2
Level 2

To me, if you copy pasted this, there's an error in your syntax.  Comparison in JS is done with double ==.

And I don't see the need for resolveNode, and then the "this" seems strange too.  Plus, rawValue returns a string.  😉

So, i think it should be 

if ( data-set.MainDocument.sfCustomerEntryInfo.Checkbox1.rawValue == "1" ) {