Replace part of the fields name

Explorer ,
Jul 24, 2017

Copy link to clipboard

Copied

hi, in my form, field names are like bellow..

primary-fn-lastname

primary-fn-firstname

primary-fn-middlename

I want to replace "primary" with "child-3". so new fields names should be like bellow. is this possible to do using javascripts??. thanks in advance.

child-3-fn-lastname

child-3-fn-firstname

child-3-fn-middlename

TOPICS
Acrobat SDK and JavaScript, Windows

Views

110

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

Replace part of the fields name

Explorer ,
Jul 24, 2017

Copy link to clipboard

Copied

hi, in my form, field names are like bellow..

primary-fn-lastname

primary-fn-firstname

primary-fn-middlename

I want to replace "primary" with "child-3". so new fields names should be like bellow. is this possible to do using javascripts??. thanks in advance.

child-3-fn-lastname

child-3-fn-firstname

child-3-fn-middlename

TOPICS
Acrobat SDK and JavaScript, Windows

Views

111

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
Jul 24, 2017 0
Adobe Community Professional ,
Jul 24, 2017

Copy link to clipboard

Copied

Want you create new form fields?

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
Reply
Loading...
Jul 24, 2017 0
Explorer ,
Jul 24, 2017

Copy link to clipboard

Copied

hi, thanks a lot for your reply. is that possible to send code to create new fields using new field names. don't worry about field formatting because there are no special formatting in my fields.. thanks..

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
Reply
Loading...
Jul 24, 2017 0
Adobe Community Professional ,
Jul 24, 2017

Copy link to clipboard

Copied

Look at the method addField in the Acrobat JavaScript Reference.

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
Reply
Loading...
Jul 24, 2017 0
Most Valuable Participant ,
Jul 24, 2017

Copy link to clipboard

Copied

JS can't rename fields. It can only create new fields in the same location with the new name, and then delete the old ones.

In this process all of the Actions, Format, Validation, Calculation, Keystroke, etc. that are associated with the fields will be lost, though.

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
Reply
Loading...
Jul 24, 2017 0