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.


In this demo you can see how to setup a form that makes a lookup into another form and sets the value to the smart field

Smart fields in ConfiForms operate on UUID, unique IDs of the records they reference

Consider having 2 forms


1st form with params and choices

Choices

Choice

Param

option 1 param1
test parameter test



2nd form with a smart field which we will set based on the search made in the search field


In editor mode you will have something like this


Where the "Rules for Field Definition macro" in form2 is configured like this




Source code for the demo (please note that forms in the source code are names form11 and form21 instead of form1 and form2)

Smart field configuration will require a change to point at your page (by id)

<ac:parameter ac:name="values">[42927284|form11|choice|true||]</ac:parameter>

<p>1st form with params and choices</p>
<ac:structured-macro ac:macro-id="f04fb496-0467-468b-952c-995c3d1f9b41" ac:name="confiform" ac:schema-version="1">
  <ac:parameter ac:name="formName">form11</ac:parameter>
  <ac:parameter ac:name="registrationFormTitle">Form 11</ac:parameter>
  <ac:rich-text-body>
    <ac:structured-macro ac:macro-id="0fa171ef-4741-4bec-a361-a415e37a4be0" ac:name="confiform-entry-register" ac:schema-version="1">
      <ac:parameter ac:name="formName">form1</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="6fb3c02a-0c6b-49a7-a067-3a76b77657fb" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">choice</ac:parameter>
        <ac:parameter ac:name="fieldLabel">Choice</ac:parameter>
        <ac:parameter ac:name="type">text</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="0b83c012-e3cb-4444-80f5-475b12190b4b" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">param</ac:parameter>
        <ac:parameter ac:name="fieldLabel">Param</ac:parameter>
        <ac:parameter ac:name="type">text</ac:parameter>
      </ac:structured-macro>
    </p>
  </ac:rich-text-body>
</ac:structured-macro>
<p>Choices</p>
<ac:structured-macro ac:macro-id="8a9c7859-802a-4891-a0ff-d12b5928663f" ac:name="confiform-table" ac:schema-version="1">
  <ac:parameter ac:name="formName">form11</ac:parameter>
  <ac:rich-text-body>
    <p>
      <br/>
    </p>
  </ac:rich-text-body>
</ac:structured-macro>
<p>
  <br/>
</p>
<p>
  <br/>
</p>
<p>2nd form with a smart field which we will set based on the search made in the search field</p>
<ac:structured-macro ac:macro-id="676b49ee-01d2-4360-ade4-2c819d6baa5f" ac:name="confiform" ac:schema-version="1">
  <ac:parameter ac:name="formName">form21</ac:parameter>
  <ac:rich-text-body>
    <ac:structured-macro ac:macro-id="96d2c853-bf81-4fd5-b1e4-be45a29d410e" ac:name="confiform-entry-register" ac:schema-version="1">
      <ac:parameter ac:name="formName">form21</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="b1d6dbb1-25c1-4aa4-9625-861de3119730" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">search</ac:parameter>
        <ac:parameter ac:name="fieldLabel">search</ac:parameter>
        <ac:parameter ac:name="fieldDescription">Type to make a lookup in form11, supports * searches</ac:parameter>
        <ac:parameter ac:name="type">text</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <br/>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="5518ec01-0156-401a-a2b6-960abca948d9" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="css">background-color:#c0c0c0;</ac:parameter>
        <ac:parameter ac:name="fieldName">selected</ac:parameter>
        <ac:parameter ac:name="fieldLabel">Selected choice</ac:parameter>
        <ac:parameter ac:name="values">[42927284|form11|choice|true||]</ac:parameter>
        <ac:parameter ac:name="type">smartselect</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="c3dbda96-7a3d-4f80-8c6c-df44f1f76766" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="css">background-color:#c0c0c0;</ac:parameter>
        <ac:parameter ac:name="fieldName">paramStatus</ac:parameter>
        <ac:parameter ac:name="fieldLabel">Param status</ac:parameter>
        <ac:parameter ac:name="type">read_only</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>-- will set selected and paramStatus fields</p>
    <p>
      <ac:structured-macro ac:macro-id="64f2f557-accf-4bc8-a624-a72ddf168aac" ac:name="confiform-field-definition-rules" ac:schema-version="1">
        <ac:parameter ac:name="condition">!search:[empty]</ac:parameter>
        <ac:parameter ac:name="fieldName">selected=[entry.id]&paramStatus=[entry.param]</ac:parameter>
        <ac:parameter ac:name="values">choice:[entry.search]</ac:parameter>
        <ac:parameter ac:name="action">Lookup and set value</ac:parameter>
        <ac:parameter ac:name="actionFieldName">search</ac:parameter>
        <ac:parameter ac:name="values2">form11:@self</ac:parameter>
        <ac:parameter ac:name="values3">LIMIT 1</ac:parameter>
      </ac:structured-macro>
    </p>
  </ac:rich-text-body>
</ac:structured-macro>




  • No labels