Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.
SOLVED

Question Formatting

Avatar

Level 1

Is there a way that I can make future questions depend on if an answer is given to a specific question?

For example:

Where are you from?

[ ] United States

If that is not checked, future questions will be unavailable.

If it is checked, the next question would be available to be answered

What state are you from?

__________________

Thanks!

J

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

It would be easier for me to see the form. If it's possible, please forward the form to stwalker.adobe@gmail.com and I will take a look.

Steve

View solution in original post

7 Replies

Avatar

Former Community Member

There are a variety of ways this can be accomplished. The two primary ways are access and presence. In the attached form I use both to enable data entry. The group of fields on the left are controlled by the 'access' property. Upon checking a country you have access to the applicable identification field. The group of fields on the right are control by the 'presence' property. Upon checking a country the applicable identification field is made visible.

Untitled.png

Steve

Avatar

Level 1

Thank you for the help - However, I'm a beginner at this. I got the presence stuff figured out, but I can't figure out how to link the two.

Avatar

Former Community Member

Which two parts can't you link together?

Steve

Avatar

Level 1

I can get the Presence under the Object tab (making it visible, invisible, etc), but I am just baffled as to how I get it to appear when the button is clicked.

Any help?

Avatar

Former Community Member

The form must be a dynamic PDF form. If you originally saved the form as a static PDF and subsequently added visibility scripting, the visibility behaviour will not occur. Save the form as dynamic PDF form and try it again.

Steve

Avatar

Level 1

I have saved it only as a dynamic pdf. I think I'm screwed up on the "access" part... I am confused on the visibility scripting that you're talking about. I don't have this... That's what my original question was getting at. I don't have the XML script to make this available.

I'm assuming this is the XML I need to be duplicating (with the replacement of "ssn" "sin" "nid" "ssn_" "nid_" "sin_"..?

var residence = form1.page1.residence.rawValue;

switch (residence) {

case "1":

form1.page1.ssn.access = "";

form1.page1.sin.access = "readOnly";

form1.page1.nid.access = "readOnly";

form1.page1.sin.rawValue = "";

form1.page1.nid.rawValue = "";

form1.page1.ssn_.presence = "visible";

form1.page1.sin_.presence = "hidden";

form1.page1.nid_.presence = "hidden";

form1.page1.sin_.rawValue = "";

form1.page1.nid_.rawValue = "";

break;

case "2":

form1.page1.ssn.access = "readOnly";

form1.page1.sin.access = "";

form1.page1.nid.access = "readOnly";

form1.page1.ssn.rawValue = "";

form1.page1.nid.rawValue = "";

form1.page1.ssn_.presence = "hidden";

form1.page1.sin_.presence = "visible";

form1.page1.nid_.presence = "hidden";

form1.page1.ssn_.rawValue = "";

form1.page1.nid_.rawValue = "";

break;

case "3":

form1.page1.ssn.access = "readOnly";

form1.page1.sin.access = "readOnly";

form1.page1.nid.access = "";

form1.page1.ssn.rawValue = "";

form1.page1.sin.rawValue = "";

form1.page1.ssn_.presence = "hidden";

form1.page1.sin_.presence = "hidden";

form1.page1.nid_.presence = "visible";

form1.page1.ssn_.rawValue = "";

form1.page1.sin_.rawValue = "";

break;

default:

break;

}

Avatar

Correct answer by
Former Community Member

It would be easier for me to see the form. If it's possible, please forward the form to stwalker.adobe@gmail.com and I will take a look.

Steve

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] ----