Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Hidden subforms not displaying

Avatar

Level 1

I created a simple form that uses javascript to hide or display subforms based on the selection from a drop down menu. Everything was working fine. When I integrated the dropdown and subforms into an existing form, the subforms no longer display on DropDownList1::change. The code looks like:

form1.subform1.DropDownList1::change - (JavaScript, client)

if(xfa.event.newText == 'C&M Crew Metro'){

sub1.presence = "visible";

sub2.presence = "hidden";

sub4.presence = "hidden";

sub5.presence = "hidden";

sub6.presence = "hidden";

sub7.presence = "hidden";

sub8.presence = "hidden";

sub9.presence = "hidden";

}

The only other coded object on the form is a reset form button, which works. I've triple checked my syntax and whatnot and can't find anything. Any ideas?

david mcchesney

IT Analyst

NMGCO

david dot mcchesney at nmgco.com

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

Did you save the form as dynamic?

Are you getting errors in the java console (ctrl - J in Acrobat)?

Paul

View solution in original post

4 Replies

Avatar

Level 10

Try using the fully qualified path for the Subform.. Sometimes, the form may be confused with the similar name fields..

For example:

     form1.Page1.sub1.presence = "visible";

You can place the cursor int he Script Editor and then press CTRL+ SHIFT buttons and click on the field.. This will give you the absolute path for the field.

Thanks

Srini

Avatar

Level 1

Thanks for the quick reply. I did try the fully qualified names, and it's still not working. Here's a visual example. The subforms display under the dropdown, based on the dropdown selection.

8-26-2010 7-57-27 AM.png

Avatar

Correct answer by
Former Community Member

Did you save the form as dynamic?

Are you getting errors in the java console (ctrl - J in Acrobat)?

Paul

Avatar

Level 1

Gah. I feel like an idiot. The form creator hadn't saved the form as dynamic. My bad. Thanks!

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----