Page tree
Skip to end of metadata
Go to start of metadata

Playground and DEMO space

This is a playground and demo space for ConfiForms and ConfiDoc addons developed and supported by Vertuna LLC

Most pages provide a storage format for the demo, so you can use the free add-on from Atlassian Confluence Source Editor to import this configuration into your Confluence and see it in action

Please note, all the examples here are provided without any obligation and may or may not be incomplete or may have bugs, and we provide NO SUPPORT for these examples and demos.


This demo demonstrates how to setup a ConfiForms form to send an email when action button is clicked

We have a simple form with just 3 fields

  • User field (we will send the email to this user)
  • Action Button field to update hidden field to trigger the email
  • Hidden field to help with triggering the email


The action flow of our action button is as follows

  • Update hidden field
  • IFTTT Rule to send an email is set on "onModified" event with condition to check the "hidden" field was updated
  • Another IFTTT rule to reset the status of a hidden field, so next time you can trigger the email again


Form configuration in the editor looks something like this



View over the data

User

Send email

Alex Medved Alex Medved

When the form view is shown for non-authenticated users then the user avatar image is not shown! (Due to privacy reasons)



When "action button" is pressed the email like this is sent to "user"



Storage format for the solution


<ac:structured-macro ac:macro-id="78d5015f-c231-400d-83ca-fb4c2b21a483" ac:name="confiform" ac:schema-version="1">
  <ac:parameter ac:name="formName">myform1</ac:parameter>
  <ac:rich-text-body>
    <ac:structured-macro ac:macro-id="48f82e8b-ac15-46f1-aeab-95b2e84c4c8e" ac:name="confiform-entry-register" ac:schema-version="1">
      <ac:parameter ac:name="restrictions">confluence-administrators</ac:parameter>
      <ac:parameter ac:name="embedded">true</ac:parameter>
      <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
      <ac:rich-text-body>
        <p>
          <br/>
        </p>
      </ac:rich-text-body>
    </ac:structured-macro>
    <p>
      <ac:structured-macro ac:macro-id="65a3fc9c-0c26-40e1-a8e3-e997221bd3a8" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">myuser</ac:parameter>
        <ac:parameter ac:name="fieldLabel">User</ac:parameter>
        <ac:parameter ac:name="type">user</ac:parameter>
        <ac:parameter ac:name="required">true</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="2555b60a-f091-4431-b449-03866fe475d8" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">sendEmail</ac:parameter>
        <ac:parameter ac:name="fieldLabel">Send email</ac:parameter>
        <ac:parameter ac:name="extras">send=true</ac:parameter>
        <ac:parameter ac:name="type">action_button</ac:parameter>
        <ac:parameter ac:name="separator">Message was sent</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="03ac525f-71a5-4f4f-bf0b-e42a957788eb" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">send</ac:parameter>
        <ac:parameter ac:name="fieldLabel">Send status</ac:parameter>
        <ac:parameter ac:name="type">hidden</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <br/>
    </p>
    <p>--- This IFTTT send an email when this condition is met:</p>
    <p>
      <em>send:true AND hasChanged(send):true</em>
    </p>
    <ac:structured-macro ac:macro-id="85f5643e-aea2-4486-a7f6-a979b8ab538e" ac:name="confiform-ifttt" ac:schema-version="1">
      <ac:parameter ac:name="condition">send:true AND hasChanged(send):true</ac:parameter>
      <ac:parameter ac:name="action">Send Email</ac:parameter>
      <ac:parameter ac:name="event">onModified</ac:parameter>
      <ac:parameter ac:name="title">Test message from [entry._page.title]</ac:parameter>
      <ac:parameter ac:name="who">[entry.myuser]</ac:parameter>
      <ac:rich-text-body>
        <p>Hi <ac:structured-macro ac:macro-id="533750c1-ed38-436f-b824-b05e0318469d" ac:name="confiform-field" ac:schema-version="1">
            <ac:parameter ac:name="fieldName">myuser.fullName</ac:parameter>
          </ac:structured-macro>
        </p>
        <p>Another email coming from <strong>
            <ac:structured-macro ac:macro-id="a615d521-25af-41c4-8ee1-fbe99ec86d04" ac:name="confiform-field" ac:schema-version="1">
              <ac:parameter ac:name="fieldName">_page.asPage.title</ac:parameter>
            </ac:structured-macro>
          </strong>
        </p>
        <p>Somebody is testing :-)</p>
      </ac:rich-text-body>
    </ac:structured-macro>
    <p>--- This IFTTT resets the value of "send" field to empty</p>
    <ac:structured-macro ac:macro-id="2bf215ca-8c96-4a29-98fd-1c76f10fa7d4" ac:name="confiform-ifttt" ac:schema-version="1">
      <ac:parameter ac:name="extras3">true</ac:parameter>
      <ac:parameter ac:name="extras4">true</ac:parameter>
      <ac:parameter ac:name="action">Create ConfiForms Entry</ac:parameter>
      <ac:parameter ac:name="event">onModified</ac:parameter>
      <ac:parameter ac:name="title">entryId=[entry.id]&amp;send=</ac:parameter>
      <ac:rich-text-body>
        <p>
          <br/>
        </p>
      </ac:rich-text-body>
    </ac:structured-macro>
  </ac:rich-text-body>
</ac:structured-macro>
<p>
  <br/>
</p>
<p>View over the data</p>
<ac:structured-macro ac:macro-id="fa031f81-b860-4d65-82e6-ee544048d6d3" ac:name="confiform-table" ac:schema-version="1">
  <ac:parameter ac:name="formName">myform1</ac:parameter>
  <ac:rich-text-body>
    <p>
      <ac:structured-macro ac:macro-id="125c92f0-0a4e-4a9f-b5c1-c6f39c437af5" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">myuser</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="8dbf3e45-96bf-4019-b194-2caf027530bb" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">sendEmail</ac:parameter>
      </ac:structured-macro>
    </p>
  </ac:rich-text-body>
</ac:structured-macro>



  • No labels