Expand my Community achievements bar.

Adobe Summit 2025: AEM Session Recordings Are Live! Missed a session or want to revisit your favorites? Watch the latest recordings now.

Mark Solution

This conversation has been locked due to inactivity. Please create a new post.

SOLVED

Help with Hidden Drop Down Lists in RBList subforms

Avatar

Former Community Member

I have created a form that contains 3 isolated Radio Button lists, each with hidden subforms that are unique per each button.

Two of my RBLists and subforms work perfectly, showing hidden Drop Down List options and other fields as they should when a button is selected.

However, RBList3 presents the Drop Down lists as user entry fields only. Each hidden subform in RBList3 contains one drop down menu and one text box for instructions.

I've used the same javascript to hide/show hidden fields when buttons are selected. All settings seem to match up. Here is a sample of my code:

if(RBList3.F.rawValue != 2) 
{
    this.presence = "hidden";
    newsubform.presence = "hidden";
}

else if(RBList3.F.rawValue == 2)
{
    this.presence = "visible";
    newsubform.presence = "hidden";
}

Does anyone have any suggestions for how to make my Drop Down Lists in RBList3 show as functional Drop lists?

I have attached the form for reference.

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

The code does woirk for E,F and G. I check to see if the user selects G if they do not then they must have chosen one of the other two options (which means the else portion of the logic is executed). If I understand you correctly the issue is the initial state of the objects EdgeDropDown2,

PanzDrawTxt, and

EdgePanelChkBxTxt. If you set their initial presence value to invisible then you will not need to modify any code. You must do this to each object individually. Click on one of the objects and on the Object palette click the Field tab. Near the bottom of that tab is a dropdown to set the initial value of presence. Set it to invisible. Repeat for the other two objects.

Paul

View solution in original post

14 Replies

Avatar

Former Community Member

I think your code is working .....you have three objects ontop of each other called PanzDrawText that is in three different subforms (E,F, and G). You are hiding G so the object in E or F is showing. You can see this as the text moves when the radio button is selected. Why do you have three different text objects?

Or am I missing something?

paul

Avatar

Former Community Member

Hi Paul,

Thanks for responding.

My client wants the text box to pop up only when a radio button selection is made. E and F should have a drop down list of options to select; however, for some reason, they are presenting as entry fields, not drop lists. G is supposed to show just the two text boxes when selected from the RBList.

I originally had the large text box as a static object outside the subform fields. Do you think it is causing the drop list conflict when wrapped together in the subform?

Brian Boden

Writer/Producer/Director

BodenWorks, Ltd.

4755 N. Hermitage Avenue

Chicago, IL ?60640

773-728-5800 office

773-848-5896 mobile

773-728-5896 fax

bodenworks@aol.com

Avatar

Former Community Member

You have lost me ......there shoudl only be one field and one text box. Then we can control the visibility of the objects based on the selction in the RadioButtonlist. Can you clean this area up then we can work towards the goal that you want. Do not break things into subforms we can add those as required (I do not think we will need them based on the current requirements).

Paul

Avatar

Former Community Member

Paul,

I've deleted repetitive fields and subforms. If user chooses E or F, the Edge Detail drop down list and only the big box of text should appear. If user chooses G, the only the note box and the big box of text should appear. Edge Detail in not applicable for the G selection, so the drop down list is irrelevant for G.

I'm curious to see how you work with only these three items without layers of subforms.

I appreciate your help!

Best,

Brian Boden

Writer/Producer/Director

BodenWorks, Ltd.

4755 N. Hermitage Avenue

Chicago, IL ?60640

773-728-5800 office

773-848-5896 mobile

773-728-5896 fax

bodenworks@aol.com

Avatar

Former Community Member

Did you forget to attach the form?

Paul

Avatar

Former Community Member

No. I attached it, but maybe it won't go through since your email address posts to the forum. I'll upload the revised file again on the forum. Let me attach it again, here, as well.

Brian Boden

Writer/Producer/Director

BodenWorks, Ltd.

4755 N. Hermitage Avenue

Chicago, IL ?60640

773-728-5800 office

773-848-5896 mobile

773-728-5896 fax

bodenworks@aol.com

Avatar

Former Community Member

If you interact with the forum through email then attachments get dropped. Use the link and attach it via the browser interface.

paul

Avatar

Former Community Member

Paul,

Here you go.

Thanks.

Avatar

Former Community Member

I think this is what you want. The code is on th echange event of the RBList3 object.

Paul

Avatar

Former Community Member

Paul,

I can't seem to view your attachment.

Brian

Avatar

Former Community Member

Hi Paul,

I see that the code works for radio button G selection in the change event. However, what I really need to happen...is for the RBList options to be present on the screen without any subform data until the user clicks button E, F or G. If either E or F is selected, then the drop list and the text box would pop up as you currently have them placed on screen.

My original problem was that the EdgeDropDown2 list loses its functionality when wrapped in a hidden subform (i.e. SubformE or SubformF).

Can I add code to the change event to make EdgeDropDown2 and PanzDrawTxt appear only if either E or F are chosen. The code you wrote below works only for G selection.

if(this.rawValue != 3)
{
    EdgeDropDown2.presence = "visible";
    PanzDrawTxt.presence = "visible";
    EdgePanelChkBxTxt.presence = "hidden";
   
}else {
    PanzDrawTxt.presence = "hidden";
    EdgeDropDown2.presence = "hidden";
    EdgePanelChkBxTxt.presence = "visible";   
}

Avatar

Correct answer by
Former Community Member

The code does woirk for E,F and G. I check to see if the user selects G if they do not then they must have chosen one of the other two options (which means the else portion of the logic is executed). If I understand you correctly the issue is the initial state of the objects EdgeDropDown2,

PanzDrawTxt, and

EdgePanelChkBxTxt. If you set their initial presence value to invisible then you will not need to modify any code. You must do this to each object individually. Click on one of the objects and on the Object palette click the Field tab. Near the bottom of that tab is a dropdown to set the initial value of presence. Set it to invisible. Repeat for the other two objects.

Paul

Avatar

Former Community Member

Paul,

Thank you for guiding me through this problem to an eye-opening resolution. As is evident, this is my first experience using the change event. I'm happy to see that it allows me to eliminate so many repetitive subform layers.

I made one minor code change to make two objects appear on the G selection. The form works beautifully now.

Thanks again!

Moving on to the next problem...

Brian

Avatar

Former Community Member

I'm updating this document for my client. Admittedly, I'm a little rusty with the code. I've added a new radio button "H" to the menu of options under Infill Panels. If the user chooses "H", he/she should only see the "OtherDescriptionTxt" field to enter the panel info they want.

But instead, "H" is giving me a drop menu that shouldn't be revealed on the selection of "H"

And, I'm not finding the right combined of code to keep E, F and G functioning properly while allowing H to do its function.

Any advice?

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