Not getting form field values correctly for the attached document.
while (i < documentFormFields.Count)
{
foreach (FormField formfield in documentFormFields)
{
KeyValuePair.Add(formfield.Name, formfield.Result);
i++;
}
}
I use this code.
It says key is repeated exception. though all formfield are distinct.
Please assistDOC Temp Aspose.zip (11.3 KB)
Thanks for your inquiry. The name of form fields is “text7”. Aspose.Words reads the name of field correctly from the document. You can check the names by saving the DOC to DOCX using MS Word and check the document.xml. Please unzip the DOCX to get the document.xml.
when i am trying to retreive formfield of whole document. the moment it reads fitst text7 field. the next is also read as text7 and code comes out of loop telling same value for key.
Thanks for your inquiry. You are facing the expected behavior of Aspose.Words. The name of all form fields in your document is “text7”. Please change the name of form fields in your document.