Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Code Block
<p>Using 2 forms to mimic shopping cart experience</p>
<p>One form to add items to shopping cart and another form will copy the items to own dataset and delete the originals (also will sent the email to administrator)</p>
<p> </p>
<ac:structured-macro ac:macro-id="951cbde6-827c-4d31-859c-9db4c93f3194" ac:name="confiform" ac:schema-version="1">
  <ac:parameter ac:name="formName">shoppingCart</ac:parameter>
  <ac:rich-text-body>
    <p>
      <ac:structured-macro ac:macro-id="e76a3581-c2d5-43b3-8031-89a4d5ed345e" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">item</ac:parameter>
        <ac:parameter ac:name="fieldLabel">Item</ac:parameter>
        <ac:parameter ac:name="type">text</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="9cc711a8-27a8-48eb-bb9a-4734037ad51d" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">count</ac:parameter>
        <ac:parameter ac:name="fieldLabel">Count</ac:parameter>
        <ac:parameter ac:name="type">number</ac:parameter>
      </ac:structured-macro>
    </p>
  </ac:rich-text-body>
</ac:structured-macro>
<ac:structured-macro ac:macro-id="5416141b-157e-4369-8646-43b62e22dca1" ac:name="confiform" ac:schema-version="1">
  <ac:parameter ac:name="formName">order</ac:parameter>
  <ac:rich-text-body>
    <p> </p>
    <p>
      <ac:structured-macro ac:macro-id="7405b826-f2b0-4e04-817f-c53943234f5d" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">item</ac:parameter>
        <ac:parameter ac:name="fieldLabel">Item</ac:parameter>
        <ac:parameter ac:name="type">text</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="f943cdcf-1328-4402-b6c4-dc034a916db4" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">count</ac:parameter>
        <ac:parameter ac:name="fieldLabel">Count</ac:parameter>
        <ac:parameter ac:name="type">number</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="67ba72fd-3647-4737-9f8b-a96ac06ef2da" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">order</ac:parameter>
        <ac:parameter ac:name="fieldLabel">order</ac:parameter>
        <ac:parameter ac:name="values">false</ac:parameter>
        <ac:parameter ac:name="type">hidden</ac:parameter>
      </ac:structured-macro>
    </p>
    <p> </p>
    <ac:structured-macro ac:macro-id="574c47f7-ba70-4b1d-a19b-0203c99ed116" ac:name="confiform-ifttt" ac:schema-version="1">
      <ac:parameter ac:name="action">Delete ConfiForms Entry</ac:parameter>
      <ac:parameter ac:name="event">onCreated</ac:parameter>
      <ac:parameter ac:name="title">id:[entry.id]</ac:parameter>
      <ac:rich-text-body>
        <p> </p>
      </ac:rich-text-body>
    </ac:structured-macro>
    <ac:structured-macro ac:macro-id="436cb102-260e-4056-9203-1f124454b30c" ac:name="confiform-ifttt" ac:schema-version="1">
      <ac:parameter ac:name="action">Copy ConfiForms Data</ac:parameter>
      <ac:parameter ac:name="extras">order:13140128</ac:parameter>
      <ac:parameter ac:name="event">onCreated</ac:parameter>
      <ac:parameter ac:name="title">item=[entry.item]&amp;count=[entry.count]</ac:parameter>
      <ac:parameter ac:name="extras2">ownedBy:[entry._user]</ac:parameter>
      <ac:parameter ac:name="who">shoppingCart:13140128</ac:parameter>
      <ac:rich-text-body>
        <p> </p>
      </ac:rich-text-body>
    </ac:structured-macro>
    <p> </p>
    <p> </p>
    <p> </p>
    <ac:structured-macro ac:macro-id="36c90b8c-4d87-48c1-ab1f-9c493bad9a37" ac:name="confiform-ifttt" ac:schema-version="1">
      <ac:parameter ac:name="condition">order:true</ac:parameter>
      <ac:parameter ac:name="action">Send Email</ac:parameter>
      <ac:parameter ac:name="event">onCreated</ac:parameter>
      <ac:parameter ac:name="title">New order</ac:parameter>
      <ac:parameter ac:name="who">sasha@vertuna.com</ac:parameter>
      <ac:rich-text-body>
        <ac:structured-macro ac:macro-id="2fc5799d-3843-4647-893e-f267e4afaf8c" ac:name="confiform-list" ac:schema-version="1">
          <ac:parameter ac:name="formName">shoppingCart</ac:parameter>
          <ac:rich-text-body>
            <p>
              <ac:structured-macro ac:macro-id="4aa652bf-8596-4cb0-be37-4ecc2989e862" ac:name="confiform-field" ac:schema-version="1">
                <ac:parameter ac:name="fieldName">item</ac:parameter>
              </ac:structured-macro>
            </p>
            <ac:structured-macro ac:macro-id="fd565bc0-a830-458c-a107-b48f686df05d" ac:name="confiform-field" ac:schema-version="1">
              <ac:parameter ac:name="fieldName">count</ac:parameter>
            </ac:structured-macro>
          </ac:rich-text-body>
        </ac:structured-macro>
        <p> </p>
        <p> </p>
        <p> </p>
        <p>from [entry.ownedBy]</p>
      </ac:rich-text-body>
    </ac:structured-macro>
    <ac:structured-macro ac:macro-id="59787f49-9974-479e-a3a5-10f759c2802a" ac:name="confiform-ifttt" ac:schema-version="1">
      <ac:parameter ac:name="action">Delete ConfiForms Entry</ac:parameter>
      <ac:parameter ac:name="event">onCreated</ac:parameter>
      <ac:parameter ac:name="title">ownedBy:[entry._user]</ac:parameter>
      <ac:parameter ac:name="who">shoppingCart:13140128</ac:parameter>
      <ac:rich-text-body>
        <p> </p>
      </ac:rich-text-body>
    </ac:structured-macro>
  </ac:rich-text-body>
</ac:structured-macro>
<p> </p>
<h2>Shopping cart items</h2>
<ac:structured-macro ac:macro-id="a061020e-1273-4ba8-b040-2c9abd2a027e" ac:name="confiform-entry-register" ac:schema-version="1">
  <ac:parameter ac:name="formName">shoppingCart</ac:parameter>
  <ac:parameter ac:name="registrationButtonLabel">Add new item</ac:parameter>
  <ac:rich-text-body>
    <p> </p>
  </ac:rich-text-body>
</ac:structured-macro>
<ac:structured-macro ac:macro-id="737833a4-1cdc-40fc-b010-49606e5db69a" ac:name="confiform-table" ac:schema-version="1">
  <ac:parameter ac:name="filter">ownedBy:[entry._user]</ac:parameter>
  <ac:parameter ac:name="formName">shoppingCart</ac:parameter>
  <ac:rich-text-body>
    <p>
      <ac:structured-macro ac:macro-id="23e20353-12f2-4109-96c0-f20737c75419" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">item</ac:parameter>
      </ac:structured-macro> <strong> <ac:structured-macro ac:macro-id="16909560-1696-49c4-b6e1-524cf5fb1199" ac:name="confiform-field" ac:schema-version="1">
          <ac:parameter ac:name="fieldName">count</ac:parameter>
        </ac:structured-macro> </strong>
      <ac:structured-macro ac:macro-id="53921ebb-c78a-44c0-b6f9-1acfdafa6d51" ac:name="confiform-entry-edit" ac:schema-version="1">
        <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
        <ac:rich-text-body>
          <p> </p>
        </ac:rich-text-body>
      </ac:structured-macro>
    </p>
  </ac:rich-text-body>
</ac:structured-macro>
<p> </p>
<hr/>
<p>Click on "Make an order" when you are ready and all items are added to the shopping cart</p>
<ac:structured-macro ac:macro-id="e4963c95-bbb6-4ed4-8daf-af189c951880" ac:name="confiform-entry-register" ac:schema-version="1">
  <ac:parameter ac:name="autoenroll">true</ac:parameter>
  <ac:parameter ac:name="formName">order</ac:parameter>
  <ac:parameter ac:name="presetValues">order=true</ac:parameter>
  <ac:parameter ac:name="registrationMessage">Your order has been sent</ac:parameter>
  <ac:parameter ac:name="registrationButtonLabel">Make an order</ac:parameter>
  <ac:rich-text-body>
    <p> </p>
  </ac:rich-text-body>
</ac:structured-macro>
<p> </p>
<p>Storage format</p>
<p>
  <ac:structured-macro ac:macro-id="9520e49b-cda4-430f-983e-bb3efbbcb478" ac:name="children" ac:schema-version="1"/>
</p>