Expand my Community achievements bar.

SOLVED

Showing / Hiding subforms with drop-down not working for no discernable reason

Avatar

Level 1

As far as I can tell, I seem to be doing everything right:

form1.Form.MainInformation.OR-StationeryType::exit - (JavaScript, client)

if

(this.rawValue == "Business Card") {

form1.Form.BusinessCardInformation.presence

= "visible";

}

else

if (this.rawValue == "Letterhead"){

form1.Form.BusinessCardInformation.presence

= "invisible";

}

Is there anything intrinsically wrong with this code? It's not working - I want the "Business Card" subform to disappear when "Business Card" is not selected, and reappear if it is.

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

Also check the following:

  • check form is saved as Dynamic XML form in the save as dialog;
  • check that the dropdown does not have a bound/specified value in the Object > Binding tab;
  • I would drop the second 'else if' and just run with an 'else'. There appears to be only two choices, so the main if statement will capture one condition and the else with set the second output.

Hope that helps,

Niall

View solution in original post

3 Replies

Avatar

Correct answer by
Level 10

Hi,

Also check the following:

  • check form is saved as Dynamic XML form in the save as dialog;
  • check that the dropdown does not have a bound/specified value in the Object > Binding tab;
  • I would drop the second 'else if' and just run with an 'else'. There appears to be only two choices, so the main if statement will capture one condition and the else with set the second output.

Hope that helps,

Niall

Avatar

Level 1

Haha, turns out it was saved as a static form this whole time - that did the trick. Thanks a bunch!