Skip navigation
Currently Being Moderated

Problem with Subform Instances at First Opening

Apr 16, 2012 11:52 AM

Hi All,

 

I have a large, complex form that has several subforms that I need to have zero instances the first time the form is opened. Most of those subforms that I set the initial instances = 0 on the Object pallet do exactly that--they behave and open with zero instances! However, I have one subform that always starts with an instance (1 instance instead of zero instances). I really don't want to work-around this, as I have done in the past when this has heppened. I want to solve it.

 

I have tried

  • Unwrapping the subform and the re-wrapping in a new subform
  • Manually editing the <occur/> element in the XML for the subform.
  • repeatedly trying different things in the Object pallet--the initial count checkbox always reverts to unchecked and the count to blank--I actually see it un-checking itself and removing the "0", right after I return to Design View from the Preview. This even happens after I have manually set the values in the XML. I double-check the Object pallet to see that my edits are reflected there (they are) and then... upon returning from Preview, it reverts and my <occur/> edit vanishes.
  • I have looked for scripts that might be causing this--without any luck.

 

I have encountered this sort of thing before and finally gave up and used the "presence" property as a work-around. The subforms don't always get utilized by the user and they should only exist when the user needs them. I will be exporting the XML data out of this form and exporting a lot of empty elements just presents another problem I'd like to avoid.

 

Any suggestions are most welcome. I hope someone knows of a solution--I have spent way too much time on this.

 

Cheers,

 

Stephen

 
Replies
  • Currently Being Moderated
    Apr 16, 2012 2:47 PM   in reply to kingphysh

    Are you pre-merging data with that subform when it opens? Although the minOccur=0 in the template, you may have an instance of that subform in the data, and therefore a copy will be forced to lay down.

    As well, do you have a schema assoicated with your form? Schema may be forcing an instance as well.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 16, 2012 4:00 PM   in reply to kingphysh

    Hi Stephen,

     

    What target version is your form set to (default tab in form properties)?

     

    In this case, if I have target version to be 9.1 or later.

     

    The following heirarchy in a simple layout:

     

    p1

         grandparent "minOccur=0"

              parent "minOccur=1"

                   mySubform "minOccur=0"

                             TextField1[0]

     

    If I render this pseudo template in Acrobat/Reader 10.1.3, I do not see the TextField, which is contained in MySubform. If I set MySubform to have a minOccur of 1, then I see it. I do not have any script on the form.

     

    To me this is working as designed, unless I have misinterpreted your scenario, but it could related to behaviour based on your target version.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 16, 2012 8:09 PM   in reply to kingphysh

    Hi Stephen,

     

    I can not reproduce this behaviour either though I am still using Designer ES 9.0 and don't have a target version or Acrobat/Reader 10.0.

     

    Is it possible to post your form somewhere so I can check I understand the problem.

     

    Bruce

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 17, 2012 5:36 AM   in reply to BR001

    Kingphysh,

     

    In designer UI, set the binding to repeat for mySubform, but leave the checkBoxes unchecked:

     

       

    binding_screenshot.jpg

    You should see the following XML for mySubform:

     

    <subform name="mySubform" w="100mm" layout="tb">

                      <field name="TextField1" w="62mm" h="9mm">

                         <ui>

                            <textEdit>

                               <border>

                                  <edge stroke="lowered"/>

                               </border>

                               <margin/>

                            </textEdit>

                         </ui>

                         <font typeface="Myriad Pro"/>

                         <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>

                         <para vAlign="middle"/>

                         <caption reserve="25mm">

                            <para vAlign="middle"/>

                            <value>

                               <text>Text Field</text>

                            </value>

                         </caption>

                      </field>

                      <?templateDesigner expand 1?>

                      <occur min="0" max="-1"/>

                   </subform>

     

    This should produce the result I think you expect.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 17, 2012 8:31 AM   in reply to kingphysh

    I'll admit, I am confused by your result as well. You shouldn't have to set the initial property to make this work.

     

    I am using Designer 10 (ES3), and am Rendering the XDP to PDF in Acrobat 10.1.3.

     

    Perhaps it is the reader version here?

     

    Can you share your form on acrobat.com?

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 17, 2012 10:34 AM   in reply to kingphysh

    Sorry. did you or did you not reproduce this with a simplified version of your form?

     

    Reader will interpret the initial design layout as you see it in Designer, unless altered via script at runtime.

     

    I cannot reproduce what you are claiming in a simplified sample. I suggest logging a ticket with Adobe Enterprise support, so your form can be inspected ( since you cannot share it to a public place.)

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 17, 2012 11:44 AM   in reply to kingphysh

    Glad to help and see you passed the issue!

     

    As you have just dicovered, with automatic or implicit binding (Use Names), 'like' names are significant, whereas 'unique' names are not in the binding process.

     

    Cheers,

    KJ

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points