Hi,
I am using Orbeon Form Builder to generate a form. I would like to delete an element from the model when the form is saved.
I have tried to create a delete action base on the examples
in this link but cannot get it to work
Given the instance
<xf:instance id="fr-form-instance">
<guide>
<title/>
<media>
<format>image</format>
</media>
<media>
<format>video</format>
</media>
</guide>
</xf:instance>
I have the following delete action within my <xf:model> to delete the last media element
<xf:delete ev:event="xforms-submit" nodeset="guide/media" at="last()"/>
But it does not work.
I have also tried
<xf:delete ev:event="xforms-submit" nodeset="media" at="last()"/>
and
<xf:action ev:event="xforms-submit">
<xf:delete nodeset="media" at="last()"/>
</xf:action>
Any ideas?
Thanks