Expand my Community achievements bar.

SOLVED

Condition of two radio button are true then ...

Avatar

Level 2

Hello Everyone,

Please excuse me if I am posting my question in the wrong group.

I'm running LiveCycle Designer ES ver: 8.2.

I've created a form that contains two different sets of radio buttons.

Using Javascript, I'm trying to write a piece of code saying:

if radio button 1 = "1" and radio button 4 = "1" then this textbox is readOnly, and greyed out.

My script is as follows:

form1.restrictions-positioned.restrictionFrequency::click - (JavaScript, client)

if (foodStuff.rawValue == "1")

{

    this.access = "readOnly";

    this.fillColor="216, 216, 216";

    this.border.edge.presence = "hidden";

}

This code is not working? Is it because I've placed it in the text box? What about the "Show" option. I've tried to place the code in "click", "validate", etc. with no results. (Note: I'm not sure of how to use this section either)

Your insight is appreciated.

Thanks,

Erik

1 Accepted Solution

Avatar

Correct answer by
Level 2

I solve the issue.

The code now appears like so:

form1.restrictions-positioned.restrictionFrequency::click - (JavaScript, client)

if (foodrestriction.resolveNode("foodStuff").rawValue == "1")

{

    this.access = "readOnly";

    this.fillColor="216, 216, 216";

    this.border.edge.presence = "hidden";

}

View solution in original post

1 Reply

Avatar

Correct answer by
Level 2

I solve the issue.

The code now appears like so:

form1.restrictions-positioned.restrictionFrequency::click - (JavaScript, client)

if (foodrestriction.resolveNode("foodStuff").rawValue == "1")

{

    this.access = "readOnly";

    this.fillColor="216, 216, 216";

    this.border.edge.presence = "hidden";

}