• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Creating a form where what user fills as an answer appears in another question

Community Beginner ,
Jan 11, 2022 Jan 11, 2022

Copy link to clipboard

Copied

I want to create a form in indesign, where let's say the first question is "Hello, what is your name?".

Under that they will use a text field filling their names, let's say "John".

And then the next question will auto-update itself to "Hello John! How are you?"

So kind of like if this was a script it would write "Hello $[NAME] how are you?"

I never wrote code or anything, this is just something I saw looking other places, I would much appreciate any help!

And this form needs to work offline. 

TOPICS
Scripting

Views

140

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jan 11, 2022 Jan 11, 2022

This can only and need to be done in Acrobat...
Add this to your second field as a custom calculation script.

var oName = this.getField("name").value ;
event.target.value = "Hello "+ oName + "! How are you?";

 

Votes

Translate

Translate
Community Expert ,
Jan 11, 2022 Jan 11, 2022

Copy link to clipboard

Copied

That cannot be done in InDesign. Check the Acrobat forum but honestly, this seems like overkill for a PDF form.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 11, 2022 Jan 11, 2022

Copy link to clipboard

Copied

This can only and need to be done in Acrobat...
Add this to your second field as a custom calculation script.

var oName = this.getField("name").value ;
event.target.value = "Hello "+ oName + "! How are you?";

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 11, 2022 Jan 11, 2022

Copy link to clipboard

Copied

Thank you! Would it be possible to create an interactive pdf file in InDesign and then add these scripts Acrobat?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 11, 2022 Jan 11, 2022

Copy link to clipboard

Copied

LATEST

Sure...

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines