Skip to main content
May 19, 2014
Question

changing content of form fields

  • May 19, 2014
  • 0 replies
  • 165 views

I have created a .indd file with some formFields and now traversing these fields.

I have got all the form fields through below code...

var allFormFields = myDoc.formFields;

for(var i=0;i<allFormFields.length;i++){

     var tf = allFormFields;

     alert(tf.id);

     alert(tf.label);

     alert(tf.name);

}

Here i am able to get id,label and name of fofmfields. Now, how to get the content (value) of the formfields and also how to change its content and write own value. For now i am using textfield in FormField.

Please reply if someone have answer for it, Thanks in advance.

This topic has been closed for replies.