Expand my Community achievements bar.

Fragment fields suddenly become editable from within the FORM

Avatar

Level 3

When we added a schema to a form that contains fragments, suddenly the fragment fields became visible and editable from the FORM.  The fields in the fragment are normally not editable unless you edit the fragment. (Designer)

This is a huge concern for us, especially as we have new developers coming and going on this project.  It is my understanding that fragments should only be editable within the fragment xdp, not from within a form that the fragment is on.

This is a problem that we can repeat / reproduce.  Would like to know if it's a bug.

Please advise,

Thanks,

Elaine

3 Replies

Avatar

Level 1

I ran into this issue yesterday. The fragment fields were editable in the form which they were referenced in. I found in the xml source tab that a normal fragment reference looks like the following.

<subform usehref="..\fragments\Address1.xdp#som($template.letterForm.Address)" x="25.4mm" y="39.533mm">

<bind match="none" ref=""/>

<?templateDesigner expand 1?></subform>

The fragments that had editable fields had <field> tags inside the subform tag. I removed them and all was back to normal.

This seemed to be a issue local to my install as a coworker was not getting the same results with the same form on her machine.

Avatar

Level 3

Interesting, everyone on my team could duplicate the issue. We had 4 people

that could. Interesting observation about the field tag being in the xml

source - Good research! However, I don't want to have to do that, I think

this (and other) issues with fragments are problematic enough that we may

just abandon them and try again after ES2 is released.

Thanks,

Elaine

Avatar

Level 10

Hi Elaine,

I thought this was a good thing that you can override fragment properties in the document that uses it.  Do you get a message "This fragment reference has local overrides to one or more properties of the source fragment" in the Warnings tab.

If you don't want the fragments properties to be override you could wrap the fragment in a custom object.

We have a fragment that has a multiline textfield with a character count and we use the ability to override the properties to update the databinding, caption, traversal, etc., this is then wrapped in a custom object so they can't update what they shouldn't.

The custom object looks something like this;

<subform usehref="..\..\Fragments\MultiLineTextField.xdp#som($template.form1.multiLineTextField)" name="name" x="0in" y="0in">

  <bind match="dataRef" ref="$"/>

  <draw name="questionNumber">

  </draw>

  <field name="value">

  <traversal>

    <traverse operation="next" ref="$"/>

  </traversal>

  </field>

</subform>

Bruce