Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This is a quick demo on how you can use Page properties and ConfiForms macros together


So, we have a simple form with just 2 fields, one text field and another one is a page/blogpost field

Image Added


For this field we will lookup it's page properties

ConfiForms Form Definition
formNamedemoForm
confluence-administratorsINLINE


testFieldtestFieldtext

pagePageCONFIFORMSpage

For the demo, we have created a record that points at this page and we will get the value of "test field" page property

Page properties is actually defined using ValueView macro

Image AddedPage properties (uses ValueView)

Page properties
t test field

ConfiForms ValueView
fieldNametestField
formNamedemoForm


Page Reporting using page properties report

Image Added

Page properties report
cqllabel = "pp" and space = currentSpace()


Show data from ConfiForms and page properties using ConfiForms TableView

Image Added

ConfiForms TableView
formNamedemoForm

testField pagepage property "t test field" valuepage.pageProperties(t field).pageProperties(test field)

Storage format for the TableView:

Code Block
<ac:structured-macro ac:macro-id="d6389b22-191b-4aa2-a1c5-7c7a02e550b7" ac:name="confiform-table" ac:schema-version="1">
  <ac:parameter ac:name="formName">demoForm</ac:parameter>
  <ac:rich-text-body>
    <p>
      <ac:structured-macro ac:macro-id="ea84b9c6-e3d1-4a97-8f13-5fb7c4cf64ff" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">testField</ac:parameter>
      </ac:structured-macro> <ac:structured-macro ac:macro-id="8b528074-606c-49ce-80a9-24c3689a3f02" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">page</ac:parameter>
      </ac:structured-macro>
      <ac:structured-macro ac:macro-id="74ddf1a4-8e98-40cb-ba36-e7ffe246bd97" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="overrideLabel">page property "test field" value</ac:parameter>
        <ac:parameter ac:name="fieldName">page.pageProperties(test field)</ac:parameter>
      </ac:structured-macro>
    </p>
  </ac:rich-text-body>
</ac:structured-macro>