Expand my Community achievements bar.

What is the maximum allowable objects on a form?

Avatar

Level 3

We have a form with about 246 fields on it and we get these errors repeating after line 4880:

Invalid append operation: field cannot have a child element of font
The element [font] has violated its allowable number of occurrences.
The fault occurred on line 4881.
Invalid append operation: field cannot have a child element of para
The element [para] has violated its allowable number of occurrences.
The fault occurred on line 4882.
Invalid append operation: field cannot have a child element of traversal
The element [traversal] has violated its allowable number of occurrences.
The fault occurred on line 4886.

 

I am looking for a way to eliminate these errors by grouping on subforms or something.

5 Replies

Avatar

Community Advisor

I think there is no limit on number of objects.

In what operation you are getting these errors?

Avatar

Level 3

These errors appear in the log window in Designer and update when I preview PDF.  If I preview HTML then they show up in the server error.log. They are not associated with any operation. The form has 5 pages filled with text boxes, check boxes, fields and tables. The errors start with an object on the second page.

Avatar

Employee Advisor

@GPhillips58 

Is it a repeatable section in the schema definition? 

Most of the time the occurrence of the field is governed by the maxOccurs parameter in the form. You can check if the threshold value is reached.

 

 

Avatar

Level 10

The line number in the error messages points to an error in the form DOM, which is a virtual XML structure built from the template and data DOMs. You can't see it in Designer, it's in the RAM only. You can dump it in a file using Acrobats Javascript console. 

 

this.createDataObject("formDom.xml", "", "text/plain");
this.setDataObjectContents("formDom.xml", util.streamFromString( xfa.form.saveXML(), "utf-8"));
this.viewState = {
    overViewMode : 7
};

 

There are fields in your form, that have more than one <font>, <para> and <traversal> element, which not allowed. Might be hard to find out which one it is. Best would be to save a copy of the form and then start to delete fields, to see, when the error goes away. Once you identified the field, open the XML source and delete the doubled elements of that particular field or simple create a new field.