Preserve names when duplicating fields

Community Beginner ,
Feb 09, 2021 Feb 09, 2021

Copy link to clipboard

Copied

Hello everyone,

 

In PDF forms I would like to do two things:
- Duplicate interactive fields on the same page
- Duplicate pages containing interactive fields

 

In both cases, InDesign automatically changes the field names:
- A running number is added
- If the field name already ends with a number, it is increased by one

 

How can I turn off this behavior?

I need fields with the same names so that the values are automatically copied from each other.

TOPICS
Bug

Views

88

Likes

translate

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

Adobe Community Professional , Feb 11, 2021 Feb 11, 2021
Here the basic script code for duplicating one selected item where the name will be restored: var sel = app.selection[0]; var dup = sel.duplicate(); dup.name = sel.name;  Code written in ExtendScript (JavaScript).   Regards,Uwe Laubender ( ACP )

Likes

translate

Translate

Translate
Adobe Community Professional ,
Feb 10, 2021 Feb 10, 2021

Copy link to clipboard

Copied

Hi rgrund,

you cannot turn off that behavior.

 

Regards,
Uwe Laubender

( ACP )

Likes

translate

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
Adobe Community Professional ,
Feb 10, 2021 Feb 10, 2021

Copy link to clipboard

Copied

That's built in by design because 2 fields with the same name will not behave as 2 separate fields. You can't change it. When you want duplicate fields to have duplicate names, you must rename the duplicates as such.

Likes

translate

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 ,
Feb 11, 2021 Feb 11, 2021

Copy link to clipboard

Copied

I see. Thank you!

 

Is there a plugin or script for a simple task like "copy paste" without InDesign changing the objects on its own?

Likes

translate

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
Adobe Community Professional ,
Feb 11, 2021 Feb 11, 2021

Copy link to clipboard

Copied

Here the basic script code for duplicating one selected item where the name will be restored:

var sel = app.selection[0];
var dup = sel.duplicate();
dup.name = sel.name;

 Code written in ExtendScript (JavaScript).

 

Regards,
Uwe Laubender

( ACP )

Likes

translate

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 ,
Feb 11, 2021 Feb 11, 2021

Copy link to clipboard

Copied

Thanks, Uwe! For single elements the script works great. 😀

 

Is there an other simple script that copies tables which contain a bunch of form fields?

Or one that duplicates entire pages?

Likes

translate

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