Expand my Community achievements bar.

SOLVED

New to LiveCycle

Avatar

Level 2

Hi everyone!

I'm new to LiveCycle and I'm trying to make a form for my company. In this form, there are several checkboxes and I would like a dropdown list to appear when one of the check boxes is selected. (One list for each checkbox.)

I'm having a lot of trouble getting the checkbox to have any effect on my list when I check it.

I have tried searching for all the information I could find on if/then statements and have even tried looking for other examples of this in other PDF's. Unfortunately, I have been unable to get any further than making a checkbox and a dropdown list that have no effect on one another.

My main question is mainly in trying to see what are the requirements to allow for a checkbox to affect the visibility of something else on my PDF. (drop down lists, subforms, text boxes, etc.)

I've been trying my hardest to teach myself, but have been unsuccessful in this aspect.

Any help would be greatly appreciated. An example would definitely suffice. If I can have one working example of this, I'm sure I can figure out what I was missing and apply it to the rest of my document.

Thanks!


--Josh R.

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

The most common mistake that is made when trying to create a form with dynamic visual properties is........to save the form as a dynamic pdf.

Steve

View solution in original post

3 Replies

Avatar

Level 2

Okay, after some searching, I was able to find an example... But, for some reason, if I try this code in a brand new PDF, it doesn't do anything at all. The results are the same as before.

This is what I'm inserting right before the checkbox field ends. My dropdown list is named "ddlist".

<event activity="mouseUp" name="event__mouseUp">
               <script contentType="application/x-javascript">

if (this.rawValue == 1)  //1 being the "on" or ticked value
{
    ddlist.presence == "visible";
}
else
{
    ddlist.presence == "hidden"; //can also go for "invisible"
}
</script>
            </event>

I can't seem to figure out what it is I'm doing wrong. I know it's something simple that I'm missing and I'll probably kick myself for it when I find out. ;]

Avatar

Correct answer by
Former Community Member

The most common mistake that is made when trying to create a form with dynamic visual properties is........to save the form as a dynamic pdf.

Steve

Avatar

Level 2

That was exactly it. I knew the code I was using was correct.

Thank you very much!

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