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
BedrockMission!

Learn More

View all

Sign in to view all badges

I have 3 radio buttons, How do I enter the script

Avatar

Avatar
Level 1
moufasa44
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile

Avatar
Level 1
moufasa44
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile
moufasa44
Level 1

18-09-2017

I have 3 radio buttons 1=New, 2=Change, 3=Deactivate & 2 text fields SSN & EIN. When New is selected, I want these text fields to become required. However, once one of the text fields is populated with a value, the other field becomes non-required. How do I accomplish this in LiveCycle & where would I enter the script?

[i cut the title back ussnorway]

[Question moved to the LiveCycle Designer forum]

Accepted Solutions (0)

Answers (2)

Answers (2)

Avatar

Avatar
Validate 1
Level 4
MinusZero
Level 4

Likes

30 likes

Total Posts

326 posts

Correct Reply

54 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile

Avatar
Validate 1
Level 4
MinusZero
Level 4

Likes

30 likes

Total Posts

326 posts

Correct Reply

54 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
MinusZero
Level 4

20-09-2017

Hi,

As mouslander said when you add radio buttons to a group, they will all work exclusively (only one can be selected)

1302983_pastedImage_0.png

As for your other question.

In the exit code of each textfield you need to test for null. For example, if the field is not null (contains something) then disable the other text field. You should also add code to enable it to if the field is cleared (null)

form1.#subform[0].tfEIN::exit - (JavaScript, client) //EIN textfield exit event

if (this.resolveNode("$").rawValue != null) {
  this.resolveNode("tfSSN").access = "protected"; //if this field contains something, disable SSN text field
}

if (this.resolveNode("$").rawValue == null) {
  this.resolveNode("tfSSN").access = "open"; //if this field doesnt contain something, enable SSN text field
}

form1.#subform[0].tfSSN::exit - (JavaScript, client) //SSN textfield exit event
if (this.resolveNode("$").rawValue != null) {
  this.resolveNode("tfEIN").access = "protected"; //if this field contains something, disable EIN text field
}

if (this.resolveNode("$").rawValue == null) {
  this.resolveNode("tfEIN").access = "open"; //if this field doesnt contain something, enable EIN text field
}

Avatar

Avatar
Validate 1
Level 4
mouslander
Level 4

Likes

23 likes

Total Posts

298 posts

Correct Reply

27 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 4
mouslander
Level 4

Likes

23 likes

Total Posts

298 posts

Correct Reply

27 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
mouslander
Level 4

19-09-2017

Put the script on the grouping around the radio buttons. The radio buttons should all be part of the same grouping to make them mutually exclusive.