Skip to main content
Participant
June 20, 2023
質問

Radio Buttons to control visible of an object on another page?

  • June 20, 2023
  • 返信数 2.
  • 261 ビュー

hello, I have a muli page layout that I'm exporting to an interactive pdf. I have radio buttons spaning two pages.  I want a radio button to control the visibility of an text box on a separate page. Is there any work around for this?? it seems that a radio button Actions are limited to the page they live on.

 

thanks!

このトピックへの返信は締め切られました。

返信数 2

Participant
June 20, 2023

it looks like i can accomplish this by editing the pdf in Acrobat Pro after exporting it from InDesign.  When editing the radio buttons there the show/hide states are available for the entire document.

 

So the function im looking for is possible, but this would be wayyyy simplier if this could be accomphiosh in InDesign.

Community Expert
June 20, 2023

First question: when refering to "text box" do you mean static text, or a text field?

A text field's visibility on a different page can be controlled with a javascript applied to a radio group on another page. This example is applied to each of the radio buttons.

 

var a = this.getField("Field1");
var b = this.getField("Field2");

if(event.target.value == "Choice1") {
a.display = display.hidden;
b.display = display.hidden;
}

else if(event.target.value == "Choice2") {
a.display = display.visible;
b.display = display.visible;
}

 

 

Participant
June 20, 2023
quote

First question: when refering to "text box" do you mean static text, or a text field?

A text field's visibility on a different page can be controlled with a javascript applied to a radio group on another page. This example is applied to each of the radio buttons.

 

 

var a = this.getField("Field1");
var b = this.getField("Field2");

if(event.target.value == "Choice1") {
a.display = display.hidden;
b.display = display.hidden;
}

else if(event.target.value == "Choice2") {
a.display = display.visible;
b.display = display.visible;
}

 

 

 


By @Jeffrey_Smith

 

Sorry, by "text box" i acually meant "combo box".

 

i have no expenence with javascript, ill have to give your suggestion a try.  thanks for your help.