Copy link to clipboard
Copied
Is there any easy way to use a script to duplicate a field (text, combo, list, checkbox, radio ...) with properties? So I have a field and I want to make an exact copy of it (frames, colors, fonts, formats, etc.) elsewhere in the form, of course under a different name. I want to avoid tediously rewriting all properties one by one (as I do so far).
Copy link to clipboard
Copied
To answer your question: No, not easily. You have to create the field from scratch, and then copy each individual property from the source field to the target one. Some things can't be copied, though. Basically anything that's an action (like Format, Calculate, Validate, Mouse Up, Mouse Enter, etc.), as well as some special properties, such as Direction "Right to Left/Left to Right".
Copy link to clipboard
Copied
If you know what script you want to use you can apply it, of course, but you can't actually copy it from one field to another (because you can't read the script applied to any event, unfortunately).
Copy link to clipboard
Copied
Right-click on the field : Create Multiple Copies.
Acrobate du PDF, InDesigner et Photoshoptographe
Copy link to clipboard
Copied
Please read the post carefully .... the question is how to do it using a java script, e.g. after pressing a key.
Copy link to clipboard
Copied
It is not possible to copy all properties from one field to another with JavaScript.
You should use CTRL-C and CTRL-V (copy-paste).
Acrobate du PDF, InDesigner et Photoshoptographe
Copy link to clipboard
Copied
I'm sorry but you don't understand my need. How do I apply Ctrl + C and Ctrl + V in a Java script for a control?
Copy link to clipboard
Copied
I understood and I wrote "not possible…with JavaScript". (See try67 explainations)
I meant that using the keys CTRL-C & CTRL-V you can copy-paste a field with all its properties, without the need of a script.
Acrobate du PDF, InDesigner et Photoshoptographe
Copy link to clipboard
Copied
Why want you a script for this?
Copy link to clipboard
Copied
I want to dynamically create tables and add or delete rows. There is no table control in Adobe DC so you have to deal with it somehow. In fact, I already have such a procedure, but I wanted to simplify it and reduce its volume.
Copy link to clipboard
Copied
To answer your question: No, not easily. You have to create the field from scratch, and then copy each individual property from the source field to the target one. Some things can't be copied, though. Basically anything that's an action (like Format, Calculate, Validate, Mouse Up, Mouse Enter, etc.), as well as some special properties, such as Direction "Right to Left/Left to Right".
Copy link to clipboard
Copied
OK, that's what I was afraid of, although I put simple formatting scripts with code .....
Copy link to clipboard
Copied
If you know what script you want to use you can apply it, of course, but you can't actually copy it from one field to another (because you can't read the script applied to any event, unfortunately).
Copy link to clipboard
Copied
This explains the issue, because my memory has already given me examples where I have seen the insertion of large parts of the script, in addition, it seems to be formatted in RTF.
Copy link to clipboard
Copied
No, a script is always plain-text only.

