JavaScript can not rename a form field. The field name is the key to all properties of the field, and can therefore not be changed.
However, it would be possible to locate a field, read in its properties, delete it and recreate it with the new name, and applying the properties. This is quite a straightforward process. You get through most of the properties, except actions (there is no getAction() method in Acrobat JavaScript).
However, it would be possible to locate a field, read in its properties, delete it and recreate it with the new name, and applying the properties. This is quite a straightforward process. You get through most of the properties, except actions (there is no getAction() method in Acrobat JavaScript).
HTH.
Max Wyss.