There are two radio button named A and B under group_1.
Also There are two radio button named C and D under group_2.
In form 4 type subform named S_1, S_2, S_3, S_4.
If click on C with A, subform only shown S_1, S_2.
If click on C with B, subform only shown S_2, S_3
Again
If click on D with A, subform only shown S_1, S_3.
If click on D with B, subform only shown S_2, S_4.
In this condition what is the code?
Please help........
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
In the click event of the radio button exclusion group.
group_1 click event in the exclusion group:
// hide all subforms
s_1.presence = "invisible";
s_2.presence = "invisible";
s_3.presence = "invisible";
s_4.presence = "invisible";
if (this.rawValue == "A" && group_2.rawValue == "C")
{
s_1.presence = "visible";
s_2.presence = "visible";
}
else if (this.rawValue == "B" && group_2.rawValue == "C")
{
s_2.presence = "visible";
s_3.presence = "visible";
}
else if (this.rawValue == "A" && group_2.rawValue == "D")
{
s_1.presence = "visible";
s_3.presence = "visible";
}
else if (this.rawValue == "B" && group_2.rawValue == "D")
{
s_2.presence = "visible";
s_4.presence = "visible";
}
group_2 click event in the exclusion group:
// hide all subforms
s_1.presence = "invisible";
s_2.presence = "invisible";
s_3.presence = "invisible";
s_4.presence = "invisible";
if (group_1.rawValue == "A" && this.rawValue == "C")
{
s_1.presence = "visible";
s_2.presence = "visible";
}
else if (group_1.rawValue == "B" && this.rawValue == "C")
{
s_2.presence = "visible";
s_3.presence = "visible";
}
else if (group_1.rawValue == "A" && this.rawValue == "D")
{
s_1.presence = "visible";
s_3.presence = "visible";
}
else if (group_1.rawValue == "B" && this.rawValue == "D")
{
s_2.presence = "visible";
s_4.presence = "visible";
}
Now in the test, I have "A", "B", "C" and "D", however you would need to replace these with the specified values for the radio buttons (see Object > Binding).
Hope that helps,
Niall
Views
Replies
Total Likes
Hi,
In the click event of the radio button exclusion group.
group_1 click event in the exclusion group:
// hide all subforms
s_1.presence = "invisible";
s_2.presence = "invisible";
s_3.presence = "invisible";
s_4.presence = "invisible";
if (this.rawValue == "A" && group_2.rawValue == "C")
{
s_1.presence = "visible";
s_2.presence = "visible";
}
else if (this.rawValue == "B" && group_2.rawValue == "C")
{
s_2.presence = "visible";
s_3.presence = "visible";
}
else if (this.rawValue == "A" && group_2.rawValue == "D")
{
s_1.presence = "visible";
s_3.presence = "visible";
}
else if (this.rawValue == "B" && group_2.rawValue == "D")
{
s_2.presence = "visible";
s_4.presence = "visible";
}
group_2 click event in the exclusion group:
// hide all subforms
s_1.presence = "invisible";
s_2.presence = "invisible";
s_3.presence = "invisible";
s_4.presence = "invisible";
if (group_1.rawValue == "A" && this.rawValue == "C")
{
s_1.presence = "visible";
s_2.presence = "visible";
}
else if (group_1.rawValue == "B" && this.rawValue == "C")
{
s_2.presence = "visible";
s_3.presence = "visible";
}
else if (group_1.rawValue == "A" && this.rawValue == "D")
{
s_1.presence = "visible";
s_3.presence = "visible";
}
else if (group_1.rawValue == "B" && this.rawValue == "D")
{
s_2.presence = "visible";
s_4.presence = "visible";
}
Now in the test, I have "A", "B", "C" and "D", however you would need to replace these with the specified values for the radio buttons (see Object > Binding).
Hope that helps,
Niall
Views
Replies
Total Likes
Thanks for hep me.
I have set binding value according to radio button.
However when I click on Group_2 after click Group_1 all subforms get hidden.
What can I do?
Views
Replies
Total Likes
Can you share the form?
When previewing the form in LC Designer or when opened in Acrobat, press Control+J to open the JavaScript Console. As you click the radio buttons do any messages appear in the console?
It probably is an object reference, like "group_1" or "Group_1".
Niall
Thanks.
Yes there was a problem. Now it works well
Another problem is arisen. Before this file was flowed type conating only one group button.
Now, No flow that means all subforms are remaining same place.
So How can I get rid of?
Views
Replies
Total Likes
here link
http://www.mediafire.com/?19r6s7l8vi6ikgr
I wish there will be no gap between two subform (flowed type)
Plaese help...
Views
Replies
Total Likes
Hi,
Instead of "invisible", use "hidden". Both will remove the object from view, but hidden will also free up the space to allow objects underneath to move up into the free space.
The containers containing the subforms will need to be set to flowed.
Check out this examples:
Hope that helps,
Niall
Thanks a lot. Your files are helpful to me.
Thanks again
Views
Replies
Total Likes
Yup, change "invisible" to "hidden" in the script: https://acrobat.com/#d=-nc0jlIjKPdgRGyEOobusg.
Good luck,
Niall
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies