Entering the same text in multiple form fields

I utilize a lot of repeatable text in form fields. When a number is involved, I can use calculate and have the boxes auto-fill with the number from the original box. When I use text, I cannot do that. I would like to be able to enter the text in one box and have it auto-fill to the other boxes. Can this be done today? If not, could it be added? Most of my PDF work is with Text.

1
1 votes

Active · Last Updated

Comments

  • If you give Form Field Text Boxes the same exact names, then they will all be updated if any one of them has their text updated. Hopefully this solves your problem!

  • I've used this feature to create a drawings set template with a title block. Any repeated information from page to page has a form field with the same name. What I need now is to be able to copy/duplicate the blank page and have its title block retain the given names. Instead, they get appended with an index number. This ends up isolating the pages from the duplication process. Its cumbersome to go edit every page's form names. Can something be done about this?

  • @Chris Linser I have the exact same question. I have a page template with linked form fields, but they get changed when copying/pasting the blank page, and it breaks the link. I would love to find a way to maintain the original form field names when copying subsequent pages!

  • bwiginton
    bwiginton Posts: 3
    edited December 18

    For anyone interested, we found a way to accomplish this using a JavaScript in the target text fields that allows copying/pasting of pages while maintaining the link to the source field. I believe this is called a dynamic search, so this code can find fields containing partial text strings.

    1. Add the target (or dependent) text form field
    2. Go to the Calculate section of the settings for that form, then select "Custom calculation field"
    3. Click "Edit", then add the code below
    4. Edit the "Target Field Name" and "Source Field Name" variables to match your field names.

    // Array to hold matching fields
    var matchingFields = [];

    // Loop through all fields in the document
    for (var i = 0; i < this.numFields; i++) {
    var fieldName = this.getNthFieldName(i);
    if (fieldName.includes("Target Field Name")) { // Match partial name
    matchingFields.push(fieldName);
    }
    }

    // Set values for matching fields
    for (var j = 0; j < matchingFields.length; j++) {
    this.getField(matchingFields[j]).value = this.getField("Source Field Name").value;
    }