- Mark as New
- Follow
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
Hi
You could have a JavaScript function that takes a RadioButton group and a on value and sets which ever radio button that has that on value on, so;
function setOn(group, onValue)
{
var radioButtons = group.resolveNodes('#field[*]');
for (var i=0; i<radioButtons.length; i++) // Find the radio button with the "on" value of onValue
{
var radioButton = radioButtons.item(i);
if (radioButton.items.nodes.item(0).value === onValue)
{
radioButton.value.text.value = onValue; // Set the radio button on
}
}
}
This assumes that the "Specify Items Values" on the binding tab is not set. If it is then the "No", "Yes", "Resolved" radio buttons will probably have numeric values ... 1,2,3
So you could then call this in the buttons, like this one for the "No" button
var transTypes = xfa.resolveNodes("transType[*]");
for (var i = 0; i < transTypes.length; i++)
{
var transType = transTypes.item(i);
Script.setOn(transType, "No")
}
This example might make more sense, https://files.acrobat.com/preview/6e5fbf69-e1e1-4514-982a-103eedda9c29
Good luck
Bruce
Views
Replies
Total Likes