0

这是一个简单的表格来帮助说明问题。这不是表单的完整代码,因为它太长(或者说臃肿)无法发布。因此,如果您打开 Adob​​e LiveCycle 并创建一个空白文档,请插入以下内容作为主要内容。

然后将其保存为pdf。如果您打开 pdf 并保存它,您会看到子表单从显示一次变为显示两次。有谁知道为什么这个代码/标记会在保存时导致创建另一个表单实例?

我对 LiveCycle 不够熟悉,无法理解所有生成的语法,但似乎没有任何事情应该这样做。我认为可能负责添加另一个表单实例的按钮在我不知情的情况下被触发,但情况似乎并非如此,因为完全删除按钮并不能解决问题。

       <subform y="1498.455mm" w="190.5mm" minH="9.234mm" layout="tb" name="ScheduleOne">
          <subform w="100.783mm" minH="6.349mm" layout="tb" name="Form">
             <subform y="47.164mm" w="190.5mm" minH="6.349mm" layout="tb" name="Form">
                <draw name="Text17" minH="6.349mm" w="190.455mm">
                   <ui>
                      <textEdit>
                         <border>
                            <?templateDesigner StyleID aped1?>
                            <edge presence="hidden"/>
                            <edge presence="hidden"/>
                            <edge/>
                            <edge presence="hidden"/>
                         </border>
                         <margin/>
                      </textEdit>
                   </ui>
                   <value>
                      <text>subForm</text>
                   </value>
                   <font typeface="Times New Roman" size="11pt"/>
                   <margin topInset="0mm" bottomInset="0mm"  leftInset="0mm" rightInset="0mm"/>
                   <para vAlign="middle" marginLeft="0pt" hAlign="center"/>
                   <traversal>
                      <traverse ref="ButtonGroup1[0].Button1[0]"/>
                   </traversal>
                </draw>
                <occur max="-1"/>
                <keep intact="contentArea"/>
                <?templateDesigner expand 1?></subform>
             <subform name="ButtonGroup1" layout="lr-tb" relevant="- print" minH="6.017mm" w="190.5mm">
                <keep intact="contentArea" previous="contentArea"/>
                <margin bottomInset="1mm" leftInset="147.828mm" topInset="1mm"/>
                <traversal>
                   <traverse operation="first" ref="Button1[0]"/>
                </traversal>
                <field relevant="-print" h="6mm" name="Button1" w="20mm">
                   <border hand="right">
                      <edge stroke="raised"/>
                      <fill>
                         <color value="212,208,200"/>
                      </fill>
                      <?templateDesigner StyleID apbx2?>
                      <?templateDesigner StyleID apbx2?>
                      <?templateDesigner StyleID apbx2?>
                      <?templateDesigner StyleID apbx2?>
                      <?templateDesigner StyleID apbx2?></border>
                   <caption>
                      <font typeface="Arial" size="9pt"/>
                      <para hAlign="center" vAlign="middle"/>
                      <value>
                         <text>Remove</text>
                      </value>
                   </caption>
                   <font typeface="Myriad Pro"/>
                   <ui>
                      <button highlight="inverted"/>
                   </ui>
                   <bind match="none"/>
                   <event activity="click" name="event__click">
                      <script contentType="application/x-javascript">

var inst = Form.instanceManager;

if (inst.count &gt; 1) {
     inst.removeInstance(inst.count - 1); } else {
    xfa.host.messageBox("The minimum allowable number of fields is 1. You cannot remove any more fields.", "Warning", 3); }</script>
                   </event>
                   <traversal>
                      <traverse ref="Button1[1]"/>
                   </traversal>
                </field>
                <subform h="1.27mm" name="Subform1" w="2.54mm"/>
                <field relevant="-print" h="6mm" name="Button1" w="20mm">
                   <border hand="right">
                      <edge stroke="raised"/>
                      <fill>
                         <color value="212,208,200"/>
                      </fill>
                      <?templateDesigner StyleID apbx2?></border>
                   <caption>
                      <font typeface="Arial" size="9pt"/>
                      <para hAlign="center" vAlign="middle"/>
                      <value>
                         <text>Add More</text>
                      </value>
                   </caption>
                   <font typeface="Myriad Pro"/>
                   <margin leftInset="0mm"/>
                   <ui>
                      <button highlight="inverted"/>
                   </ui>
                   <bind match="none"/>
                   <event activity="click" name="event__click">
                      <script contentType="application/x-javascript">
Form.instanceManager.addInstance(1);</script>
                   </event>
                   <traversal>
                      <traverse ref="Text16[0]"/>
                   </traversal>
                </field>
                <?templateDesigner expand 0?></subform>
             <draw name="Text16" w="190.455mm">
                <ui>
                   <textEdit/>
                </ui>
                <value>
                   <text>MainForm</text>
                </value>
                <font size="9pt" typeface="Arial"/>
                <margin topInset="0mm" bottomInset="0mm" leftInset="0mm" rightInset="0mm"/>
                <traversal>
                   <traverse ref="ButtonGroup2[0].Button1[0]"/>
                </traversal>
                <para hAlign="center"/>
             </draw>
             <occur max="-1"/>
             <keep intact="contentArea"/>
             <?templateDesigner expand 0?></subform>
          <subform name="ButtonGroup2" layout="lr-tb" relevant="- print" minH="6.017mm" w="190.5mm">
             <keep intact="contentArea" previous="contentArea"/>
             <margin bottomInset="1mm" leftInset="147.828mm"  topInset="1mm"/>
             <traversal>
                <traverse operation="first" ref="Button1[0]"/>
             </traversal>
             <field relevant="-print" h="6mm" name="Button1" w="20mm">
                <border hand="right">
                   <edge stroke="raised"/>
                   <fill>
                      <color value="212,208,200"/>
                   </fill>
                   <?templateDesigner StyleID apbx2?>
                   <?templateDesigner StyleID apbx2?>
                   <?templateDesigner StyleID apbx2?>
                   <?templateDesigner StyleID apbx2?>
                   <?templateDesigner StyleID apbx2?></border>
                <caption>
                   <font typeface="Arial" size="9pt"/>
                   <para hAlign="center" vAlign="middle"/>
                   <value>
                      <text>Remove</text>
                   </value>
                </caption>
                <font typeface="Myriad Pro"/>
                <ui>
                   <button highlight="inverted"/>
                </ui>
                <bind match="none"/>
                <event activity="click" name="event__click">
                   <script contentType="application/x-javascript">

var inst = Form.instanceManager;

if (inst.count &gt; 1) {
     inst.removeInstance(inst.count - 1); } else {
    xfa.host.messageBox("The minimum allowable number of fields is 1. You cannot remove any more fields.", "Warning", 3); }</script>
                </event>
                <traversal>
                   <traverse ref="Button1[1]"/>
                </traversal>
             </field>
             <subform h="1.27mm" name="Subform1" w="2.54mm"/>
             <field relevant="-print" h="6mm" name="Button1" w="20mm">
                <border hand="right">
                   <edge stroke="raised"/>
                   <fill>
                      <color value="212,208,200"/>
                   </fill>
                   <?templateDesigner StyleID apbx2?></border>
                <caption>
                   <font typeface="Arial" size="9pt"/>
                   <para hAlign="center" vAlign="middle"/>
                   <value>
                      <text>Add More</text>
                   </value>
                </caption>
                <font typeface="Myriad Pro"/>
                <margin leftInset="0mm"/>
                <ui>
                   <button highlight="inverted"/>
                </ui>
                <bind match="none"/>
                <event activity="click" name="event__click">
                   <script contentType="application/x-javascript">
Form.instanceManager.addInstance(1);</script>
                </event>
             </field>
             <?templateDesigner expand 0?></subform>
          <traversal>
             <traverse operation="first" ref="Form[0].Form[0].Text17 [0]"/>
          </traversal>
          <?templateDesigner expand 1?></subform>
4

1 回答 1

1

所以这个问题是通过删除一个空的子表单来“修复”的。没有人知道为什么,但是删除子表单并为所有元素赋予唯一的名称可以防止元素重复。

它已作为一个错误报告给 Adob​​e。

于 2009-10-20T16:44:09.447 回答