Accessing Array of form Fields

Accessing Array of form Fields

Forum member · Jan 27, 2014
How can I access a form field that may be an array? In my case, I have a list of checkboxes all named the same thing each with a different value. How would I, say, set the value for the third one? employee_type is a list checkboxes on the pdf form. When I try to access it via an index, it gives me an error. I am trying to access it like this: if (strNodeName == "employee_type") { pdfDocument.Form.Fields[strNodeName][2].Value = strNodeValue; } the error I get is: Cannot apply indexing with [] to an expression of type 'ce.Te.DynamicPDF.Forms.FormField' Thanks This was an activeX fdf solution before that I am porting to .net and testing to see if your product will be a suitable replacement.

Re: Accessing Array of form Fields

Support · Jan 27, 2014
Hello, When you access the form fields collection (pdfDocument.Form.Fields) using a field name or array index it will return a single form field object. Trying to access it like a multidimensional array will not work. Please send over a copy of the PDF form template to [^a|mailto:support@cete.com|opennewwindow|support@cete.com^] so we can look into it further. Thanks, ceTe Software Support Team.