Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list
SOLVED

Form where testing if radiobuttonlist is null and then display message

Avatar

Level 7

I created a test form to try to get this work and can't seem to make it work. In my form I have a ddlist on page 1. on page 2 I have a subform that the selection in the ddl makes visible--that's working.

There is a radiobuttonlist in the subform. I'd like to check on the submit button if ddl == 2 and radiobuttonlist == null then display a message. Here is my script:

//Create a variable to hold the document object

var

v3 = form1.page1.division.rawValue;

var

v15 = form1.page2.pcEquip.dirAbove.RadioButtonList.rawValue;

 

if

((v3 == 2) && (v15 == null))

{

xfa.host.messageBox( "Please indicate whether the associate is a director or above" );

xfa.host.setFocus("form1.page2.pcEquip.dirAbove.RadioButtonList");

}

else

{

Button3.execEvent("click");

}

The script is finishing as desired with the email window, but doesn't catch that the radiobuttonlist is null. Any help would be appreciated.

Thanks,

MDawn

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

Test the radio button exclusion group against an emply string. For example:

if (v15 == "")

{

     // your script here.

}

Hope that helps,

Niall

2 Replies

Avatar

Correct answer by
Level 10

Hi,

Test the radio button exclusion group against an emply string. For example:

if (v15 == "")

{

     // your script here.

}

Hope that helps,

Niall

Avatar

Level 7

That worked. Thank you.

Margaret Dawn

630-850-1065