Hi all, when I submit my form I only seem to be able to submit one version of it.
I want to be able to submit multiple different versions of the form data. Does anyone know what I am doing wrong? Regards, John. <xhtml:html xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:f="http://orbeon.org/oxf/xml/formatting" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:widget="http://orbeon.org/oxf/xml/widget" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" xmlns:xbl="http://www.w3.org/ns/xbl" xmlns:fr="http://orbeon.org/oxf/xml/form-runner" lang="en"> <xhtml:head> <xforms:model id="main-model"> <xforms:instance id="data-instance"> <data> <DOCUMENT> <TOTALS> <GOODSTOTAL></GOODSTOTAL> </TOTALS> <LINEITEM> <LINENO>1</LINENO> <NOOFPACKS>2</NOOFPACKS> <UNITPRICE>3</UNITPRICE> <LINEVALUE>6</LINEVALUE> </LINEITEM> </DOCUMENT> </data> </xforms:instance> <xforms:instance id="data-template"> <LINEITEM> <LINENO></LINENO> <NOOFPACKS></NOOFPACKS> <UNITPRICE></UNITPRICE> <LINEVALUE></LINEVALUE> </LINEITEM> </xforms:instance> <xforms:bind nodeset="/data/DOCUMENT/LINEITEM/LINEVALUE" calculate="if (../NOOFPACKS castable as xs:decimal and ../UNITPRICE castable as xs:decimal) then ../NOOFPACKS * ../UNITPRICE else ''"/> <xforms:bind nodeset="/data/DOCUMENT/TOTALS/GOODSTOTAL" calculate="if (sum(/data/DOCUMENT/LINEITEM/LINEVALUE) castable as xs:decimal) then sum(/data/DOCUMENT/LINEITEM/LINEVALUE) else ''"/> <xforms:bind nodeset="/data/DOCUMENT/LINEITEM[position()]/NOOFPACKS" readonly="(/data/DOCUMENT/LINEITEM[position()]/NOOFPACKS != '')"/> </xforms:model> </xhtml:head> <xhtml:body> <xhtml:div id="borderwrap"> <xhtml:div> <xhtml:table width="1000px"> <xhtml:tr> <xhtml:td colspan="7"> <xforms:trigger appearance="minimal"> <xforms:label>Add additional line</xforms:label> <xforms:insert ev:event="DOMActivate" context="instance('data-instance')/DOCUMENT" nodeset="DOCUMENT/LINEITEM" at="1" position="before" origin="instance('data-template')"/> </xforms:trigger> <xhtml:br/> <xhtml:br/> </xhtml:td> </xhtml:tr> <xforms:repeat nodeset="DOCUMENT/LINEITEM" id="al-repeat"> <xhtml:tr> <xhtml:td colspan="7"> <xforms:trigger appearance="minimal"> <xforms:delete ev:event="DOMActivate" context="instance('data-instance')" nodeset="DOCUMENT/LINEITEM" at="index('al-repeat')"/> <xforms:label>Delete</xforms:label> </xforms:trigger> </xhtml:td> </xhtml:tr> <xhtml:tr valign="top"> <xhtml:td> <xforms:input id="lineno" ref="LINENO" incremental="true" style="display:none;" class="input"> </xforms:input> </xhtml:td> <xhtml:td> <xforms:input id="noofpacks" ref="NOOFPACKS" incremental="true" class="input"> <xforms:label>noofpacks</xforms:label> </xforms:input> </xhtml:td> <xhtml:td> <xforms:input id="unitprice" ref="UNITPRICE" incremental="true" class="input"> <xforms:label>UNITPRICE</xforms:label> </xforms:input> </xhtml:td> <xhtml:td> <xforms:input id="linetotal" ref="LINEVALUE" incremental="true"> <xforms:label>LINEVALUE</xforms:label> </xforms:input> </xhtml:td> </xhtml:tr> </xforms:repeat> <xhtml:tr> <xhtml:td colspan="4" style="text-align:right"> <xforms:input id="totalvalue" ref="DOCUMENT/TOTALS/GOODSTOTAL" incremental="true"> <xforms:label>Total Value (GBP):</xforms:label></xforms:input> </xhtml:td> </xhtml:tr> </xhtml:table> </xhtml:div> </xhtml:div> </xhtml:body> </xhtml:html> |
John,
By default in Form Runner each "Save" overwrites the previous version. You might want to try the "submit" button instead of the "save" button on the detail page. Then the oxf.fr.detail.submit.buttons property can use the "clear" button to reset the form, and afterwards a new submission should create new data in the persistence layer: http://wiki.orbeon.com/forms/doc/developer-guide/configuration-properties#TOC-Buttons-on-Detail-Page -Erik On Mon, Aug 31, 2009 at 6:07 PM, JohnBampton <[hidden email]> wrote: > > Hi all, when I submit my form I only seem to be able to submit one version of > it. > > I want to be able to submit multiple different versions of the form data. > > Does anyone know what I am doing wrong? > > Regards, > > John. > > > > <xhtml:html xmlns:xforms="http://www.w3.org/2002/xforms" > xmlns:f="http://orbeon.org/oxf/xml/formatting" > xmlns:xhtml="http://www.w3.org/1999/xhtml" > xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" > xmlns:xi="http://www.w3.org/2001/XInclude" > xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" > xmlns:xs="http://www.w3.org/2001/XMLSchema" > xmlns:widget="http://orbeon.org/oxf/xml/widget" > xmlns:ev="http://www.w3.org/2001/xml-events" > xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" > xmlns:xbl="http://www.w3.org/ns/xbl" > xmlns:fr="http://orbeon.org/oxf/xml/form-runner" lang="en"> > <xhtml:head> > <xforms:model id="main-model"> > <xforms:instance id="data-instance"> > <data> > <DOCUMENT> > <TOTALS> > <GOODSTOTAL></GOODSTOTAL> > </TOTALS> > <LINEITEM> > <LINENO>1</LINENO> > <NOOFPACKS>2</NOOFPACKS> > <UNITPRICE>3</UNITPRICE> > <LINEVALUE>6</LINEVALUE> > </LINEITEM> > </DOCUMENT> > </data> > </xforms:instance> > <xforms:instance id="data-template"> > <LINEITEM> > <LINENO></LINENO> > <NOOFPACKS></NOOFPACKS> > <UNITPRICE></UNITPRICE> > <LINEVALUE></LINEVALUE> > </LINEITEM> > </xforms:instance> > <xforms:bind nodeset="/data/DOCUMENT/LINEITEM/LINEVALUE" > calculate="if (../NOOFPACKS castable as xs:decimal and ../UNITPRICE castable > as > xs:decimal) then ../NOOFPACKS * ../UNITPRICE else ''"/> > <xforms:bind nodeset="/data/DOCUMENT/TOTALS/GOODSTOTAL" > calculate="if (sum(/data/DOCUMENT/LINEITEM/LINEVALUE) castable as > xs:decimal) then sum(/data/DOCUMENT/LINEITEM/LINEVALUE) else ''"/> > > <xforms:bind > nodeset="/data/DOCUMENT/LINEITEM[position()]/NOOFPACKS" > readonly="(/data/DOCUMENT/LINEITEM[position()]/NOOFPACKS != '')"/> > > </xforms:model> > </xhtml:head> > <xhtml:body> > <xhtml:div id="borderwrap"> > <xhtml:div> > <xhtml:table width="1000px"> > <xhtml:tr> > <xhtml:td colspan="7"> > <xforms:trigger appearance="minimal"> > <xforms:label>Add additional > line</xforms:label> > <xforms:insert ev:event="DOMActivate" > context="instance('data-instance')/DOCUMENT" nodeset="DOCUMENT/LINEITEM" > at="1" position="before" > origin="instance('data-template')"/> > </xforms:trigger> > <xhtml:br/> > <xhtml:br/> > </xhtml:td> > </xhtml:tr> > <xforms:repeat nodeset="DOCUMENT/LINEITEM" id="al-repeat"> > <xhtml:tr> > <xhtml:td colspan="7"> > <xforms:trigger appearance="minimal"> > <xforms:delete ev:event="DOMActivate" > context="instance('data-instance')" nodeset="DOCUMENT/LINEITEM" > at="index('al-repeat')"/> > <xforms:label>Delete</xforms:label> > </xforms:trigger> > </xhtml:td> > </xhtml:tr> > <xhtml:tr valign="top"> > <xhtml:td> > <xforms:input id="lineno" ref="LINENO" > incremental="true" style="display:none;" class="input"> > </xforms:input> > </xhtml:td> > <xhtml:td> > <xforms:input id="noofpacks" ref="NOOFPACKS" > incremental="true" class="input"> > <xforms:label>noofpacks</xforms:label> > </xforms:input> > </xhtml:td> > <xhtml:td> > <xforms:input id="unitprice" ref="UNITPRICE" > incremental="true" class="input"> > <xforms:label>UNITPRICE</xforms:label> > </xforms:input> > </xhtml:td> > <xhtml:td> > <xforms:input id="linetotal" ref="LINEVALUE" > incremental="true"> > <xforms:label>LINEVALUE</xforms:label> > </xforms:input> > </xhtml:td> > </xhtml:tr> > </xforms:repeat> > <xhtml:tr> > <xhtml:td colspan="4" style="text-align:right"> > <xforms:input id="totalvalue" > ref="DOCUMENT/TOTALS/GOODSTOTAL" incremental="true"> > <xforms:label>Total Value > (GBP):</xforms:label></xforms:input> > </xhtml:td> > </xhtml:tr> > </xhtml:table> > </xhtml:div> > </xhtml:div> > </xhtml:body> > </xhtml:html> > > -- > View this message in context: http://www.nabble.com/Submit-multiple-versions-of-the-form-data-tp25232847p25232847.html > Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.com. > > > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Free forum by Nabble | Edit this page |