<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>Debenu Quick PDF Library - PDF SDK Community Forum : How to use Parent / Child Fields</title>
  <link>http://www.quickpdf.org/forum/</link>
  <description><![CDATA[This is an XML content feed of; Debenu Quick PDF Library - PDF SDK Community Forum : I need help - I can help : How to use Parent / Child Fields]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 13:47:02 +0000</pubDate>
  <lastBuildDate>Tue, 30 Apr 2019 11:10:41 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 11.01</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.quickpdf.org/forum/RSS_post_feed.asp?TID=3702</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Debenu Quick PDF Library - PDF SDK Community Forum]]></title>
   <url>http://www.quickpdf.org/forum/forum_images/QPDF_Forum_Title.png</url>
   <link>http://www.quickpdf.org/forum/</link>
  </image>
  <item>
   <title><![CDATA[How to use Parent / Child Fields : some background hints regarding...]]></title>
   <link>http://www.quickpdf.org/forum/how-to-use-parent-child-fields_topic3702_post14766.html#14766</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=111">Ingo</a><br /><strong>Subject:</strong> 3702<br /><strong>Posted:</strong> 30 Apr 19 at 11:10AM<br /><br />some background hints regarding appearance streams directly from the publishers:<br>https://www.debenu.com/kb/appearance-streams-pdf-form-fields/<br><br>]]>
   </description>
   <pubDate>Tue, 30 Apr 2019 11:10:41 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/how-to-use-parent-child-fields_topic3702_post14766.html#14766</guid>
  </item> 
  <item>
   <title><![CDATA[How to use Parent / Child Fields : I couldn&amp;#039;t find anything...]]></title>
   <link>http://www.quickpdf.org/forum/how-to-use-parent-child-fields_topic3702_post14765.html#14765</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=872">waynefulcher</a><br /><strong>Subject:</strong> 3702<br /><strong>Posted:</strong> 30 Apr 19 at 1:14AM<br /><br />I couldn't find anything relevant in that link. It only referred to setting the value for checkboxes and radiobutton which is a completely different topic.<div><br></div><div>But after a couple more hours of research I found a solution and figured I would post it for other developers.</div><div><br></div><div>When you are updating a fields value and want the PDF to show the new value especially when you have multiple text fields with the same name which creates child fields you should also call:</div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PDF.UpdateAppearanceStream(Index);</div><div>right after calling the SetFormFieldValue();</div><div><br></div><div>There is also some notes about a&nbsp;NeedAppearances flag but I couldn't find notes that made sense as to how to set it and what the affects would be. But I do know if I call the UpdateAppearanceStream after setting the value then the output PDF shows correctly with multiple fields.</div><div><br></div></div>]]>
   </description>
   <pubDate>Tue, 30 Apr 2019 01:14:14 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/how-to-use-parent-child-fields_topic3702_post14765.html#14765</guid>
  </item> 
  <item>
   <title><![CDATA[How to use Parent / Child Fields : Hi Wayne,this should give you...]]></title>
   <link>http://www.quickpdf.org/forum/how-to-use-parent-child-fields_topic3702_post14764.html#14764</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=111">Ingo</a><br /><strong>Subject:</strong> 3702<br /><strong>Posted:</strong> 29 Apr 19 at 10:53PM<br /><br />Hi Wayne,<br><br>this should give you an idea?<br>http://www.quickpdf.org/forum/setting-check-box-subfield-values_topic1842.html<br><br>]]>
   </description>
   <pubDate>Mon, 29 Apr 2019 22:53:53 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/how-to-use-parent-child-fields_topic3702_post14764.html#14764</guid>
  </item> 
  <item>
   <title><![CDATA[How to use Parent / Child Fields : I have a PDF which has 5 text...]]></title>
   <link>http://www.quickpdf.org/forum/how-to-use-parent-child-fields_topic3702_post14763.html#14763</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=872">waynefulcher</a><br /><strong>Subject:</strong> 3702<br /><strong>Posted:</strong> 29 Apr 19 at 10:45PM<br /><br />I have a PDF which has 5 text fields with the same field name "BankNameSingle"<div><br></div><div>When I use Delphi 7 and QuickPDF version 16.x and loop through the fields and log the field names in the PDF here is my code:</div><div><br></div><div><div>&nbsp; // Loop through fields and display the field Names</div><div>&nbsp; fieldCount := PDF.FormFieldCount ;</div><div>&nbsp; for FieldIX := 1 to fieldCount do begin</div><div>&nbsp; &nbsp; Log( PDF.GetFormFieldTitle(FieldIX) );</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; childCount := PDF.GetFormFieldKidCount(FieldIX) ;</div><div>&nbsp; &nbsp; if (childCount &gt; 0) then begin</div><div>&nbsp; &nbsp; &nbsp; for childIX := 1 to childCount do begin</div><div>&nbsp; &nbsp; &nbsp; &nbsp; tempIX := pdf.GetFormFieldKidTempIndex(FieldIX, childIX) ;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; Log('&nbsp; &nbsp; '+PDF.GetFormFieldTitle(tempIX));</div><div>&nbsp; &nbsp; &nbsp; end ;</div><div>&nbsp; &nbsp; end ;</div><div>&nbsp; end ;</div></div><div><br></div><div>And here is what it outputs:</div><div><br></div><div><div>&nbsp; &nbsp; BankNameSingle.&nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; BankNameSingle.&nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; BankNameSingle.&nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; BankNameSingle.&nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; BankNameSingle.&nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; BankNameSingle&nbsp; &nbsp; &nbsp; &nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; BankNameSingle.1&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; BankNameSingle.2&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; BankNameSingle.3&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; BankNameSingle.4&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; BankNameSingle.5&nbsp;</div></div><div><br></div><div>First Question is why do the 5 child fields seem to have a corresponding (I'm not sure what to call it), main field with the period at the end?</div><div>So clearly the field with <b>no period</b> at the end is the parent then the ones indented with a period plus the number 1 thru 5 are the child fields, but what do I do with the fields that are not the parent and not the child either?</div><div><br></div><div>Second Part is I have no idea how to set the "Value" to the fields.</div><div>I have a test program to set the fields value, save the pdf to disk then I open the PDF.</div><div>In almost all cases the value only shows in the first field encountered and not the other fields.</div><div><br></div><div>I have tried setting the value to just the parent.</div><div>I have tried setting the value to just the child fields.</div><div>And I have tried setting the value for both the Parent and the Child Fields.</div><div>I am ignoring the fields that just end with the period.</div><div>Below is sample code for setting value to both the parent and child fields.</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; myTestObj.UpdateFieldValue('BankNameSingle', 'Bank Name Goes Here') ;</div><div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; ....</div><div>&nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; procedure TTestObject.UpdateFieldValue(FieldName: String; Value: String) ;</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fieldCount := PDF.FormFieldCount ;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for FieldIX := 1 to fieldCount do begin</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (PDF.GetFormFieldTitle(FieldIX) = FieldName) then begin</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PDF.SetFormFieldValue(FieldIX, Value) ;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PDF.SetFormFieldDefaultValue(FieldIX, Value) ;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; childCount := PDF.GetFormFieldKidCount(FieldIX) ;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (childCount &gt; 0) then begin</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for childIX := 1 to childCount do begin</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tempIX := pdf.GetFormFieldKidTempIndex(FieldIX, childIX) ;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PDF.SetFormFieldValue(tempIX, Value) ;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PDF.SetFormFieldDefaultValue(tempIX, Value) ;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end ;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end ;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end ;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end ;</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; end ;&nbsp;&nbsp;</div></div><div><br></div><div>I have traced through the code and it is calling SetFormFieldValue() and SetFormFieldDefaultValue() when I want it to but the output is not all fields have the value.</div><div>By the way I can open the PDF with FoxIt and type any value in any one of those 5 fields and what I type will also be updated in all of the other 4 fields with that name. So it works as expected in FoxIt Reader.</div><div><br></div><div>Any help would be greatly appreciated.</div><div><br></div><div><br></div><div><br></div><div><br><div><div></div></div></div>]]>
   </description>
   <pubDate>Mon, 29 Apr 2019 22:45:21 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/how-to-use-parent-child-fields_topic3702_post14763.html#14763</guid>
  </item> 
 </channel>
</rss>