title: Itext to update PDF form with multiple fields with same Field Name
body: <p>I have a requirement where i have to populate values in a PDF Form using Itext.</p>
  
  <p>the Form i have has multiple fields with the same field names.
  The Concept is to populate same value in case the PDF form field name is common.</p>
  
  <p>so if there is are 2 or more fields with the name txtSysTime, then the code should fill the system time in all the fields.</p>
  
  <p>My question is basically</p>
  
  <ol>
  <li>Is this kind of functionality supported at all by Itext?</li>
  <li>If it is Possible then how can we do the same.</li>
  </ol>
  
  <p>I am using the below code for attempting the same:</p>
  
  <pre><code>PdfReader pdfTemplate = new PdfReader(inputFilePath);
  FileOutputStream fileOutputStream = new FileOutputStream(outputFilePath);
  ByteArrayOutputStream out = new ByteArrayOutputStream();
  PdfStamper stamper = new PdfStamper(pdfTemplate, fileOutputStream);
  stamper.setFormFlattening(true);
  stamper.getAcroFields().setField("TextBox", "value filled");
  </code></pre>
  
  <p>With this code the value in the first field with the same name is populated correctly but the rest of it is left blank.</p>
  
  <p>Please help</p>