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.


We have a simple form with 2 fields:

  • choice1 - to hold a text (field type: text)
  • votes - to count votes (field type: voting)

See storage format for the configuration 


The demo will work only for logged-in users!!!!



 <ac:structured-macro ac:macro-id="61430c46-979f-486a-98f7-33666ecc779e" ac:name="confiform" ac:schema-version="1">
  <ac:parameter ac:name="formName">voting</ac:parameter>
  <ac:rich-text-body>
    <p>
      <ac:structured-macro ac:macro-id="8ddfe4e8-085f-485a-a31e-8580a0106e5f" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">choice1</ac:parameter>
        <ac:parameter ac:name="fieldLabel">Choice 1</ac:parameter>
        <ac:parameter ac:name="type">text</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="516d13d9-3b30-4ba3-967c-902b7c5169f9" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">votes</ac:parameter>
        <ac:parameter ac:name="fieldLabel">Vote!</ac:parameter>
        <ac:parameter ac:name="values">Vote for me!</ac:parameter>
        <ac:parameter ac:name="extras">Remove my vote</ac:parameter>
        <ac:parameter ac:name="type">voting</ac:parameter>
      </ac:structured-macro>
      <ac:structured-macro ac:macro-id="7fb066a8-6d3a-4165-b6c6-32860fb77573" ac:name="confiform-entry-register" 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>


Using a ConfiForms ListView macro to show the data, "choice1" field followed by "votes" field

Votes

this is choice 1

this is choice 2

test

asdf

koko

test

xx

test

yes

1

122

"'(§'"'('"('"

this is choice 1

2

2

test

778

vote1

abc

Me

1

Home

Home

Recurring Broadcasts

Chris

1

342

423

423

test

kur

Milen

q

1

sadf

edfs

1111

test

1

e

4

4

2323

aaaaaaaaaaaa

Wow

1

tert

e

0

1

test

1

hi

abc

Test

11

foo

fwefe

best chouce ever

weekend

1

1

111

77

hi

faces

f

111

dsadas

John

12

zzzzzzzzz

fff

fffff

DecaTest

DecaTest

V

test

Test

7

7

s

gdxg

12

terry

terry

1515151

1

xx

Test

tt

ab

0

text

cycyxc

yxcxyc

123

123abce

test

k

a

Toll

xzx

abc


As the voting field holds users who has voted then we can easily list the users who has voted

With the help of Virtual functions, and "asUserNames" in particular. So, using "votes.asUserNames" will show the list of usernames who has voted for this particular "choice"

Who has voted

this is choice 1

sash


this is choice 2


sash


test

sash



asdf

sash


koko


test


xx


test


yes


1


122


"'(§'"'('"('"

sash


this is choice 1


2


2


test


778


vote1


abc


Me


1


Home


Home


Recurring Broadcasts


Chris


1


342


423


423


test


kur


Milen


q


1


sadf


edfs


1111


test


1


e


4


4


2323


aaaaaaaaaaaa


Wow


1


tert


e


0


1


test


1


hi


abc


Test


11


foo


fwefe


best chouce ever


weekend


1


1


111


77


hi


faces


f


111


dsadas


John


12


zzzzzzzzz


fff


fffff


DecaTest


DecaTest



V


test



Test


7


7


s


gdxg


12


terry


terry


1515151


1


xx


Test


tt


ab


0


text


cycyxc


yxcxyc


123


123abce


test


k


a


Toll


xzx


abc




Storage format for the last "ListView"

<ac:structured-macro ac:macro-id="b0f059b6-8caa-4846-85ae-30f793032132" ac:name="confiform-list" ac:schema-version="1">
  <ac:parameter ac:name="formName">voting</ac:parameter>
  <ac:rich-text-body>
    <p>
      <ac:structured-macro ac:macro-id="71b8430e-27de-4fea-a1d0-856cee1a5728" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">choice1</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="a9069365-764c-4835-acbf-399e91121e55" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">votes</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <strong>
        <ac:structured-macro ac:macro-id="9cb95250-6983-4260-b749-c5c29880aa6c" ac:name="confiform-field" ac:schema-version="1">
          <ac:parameter ac:name="fieldName">votes.asUserNames</ac:parameter>
        </ac:structured-macro>
      </strong>
    </p>
    <p>
      <strong>
        <br/>
      </strong>
    </p>
  </ac:rich-text-body>
</ac:structured-macro>
  • No labels