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

81

Likes

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

Advocate , 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?";

Likes

Translate

Translate
Adobe Community Professional ,
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.

Likes

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
Advocate ,
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?";

 

Likes

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?

Likes

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
Advocate ,
Jan 11, 2022 Jan 11, 2022

Copy link to clipboard

Copied

LATEST

Sure...

 

Likes

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