Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,461,051
Community Members
 
Community Events
176
Community Groups

ConfiForms via Excerpt Include - Is there a solution for this?

I have a ConfiForms form that is used to create another page using the IFTTT macro. The new page also contains a ConfiForms form (see example code 1).

In my use case, my users have a) to create a new page, b) to fill out the form on the new page and c) to add text and graphics information using the edit mode of Confluence. I would like to avoid that they see all ConfiForms macros if they edit the page (they may get irritated by the bunch of macros or they may delete them by accident).

Therefore I have moved all ConfiForms macros inside the IFTTT macro to a third page ("module page") and used an Excerpt macro there. Then I placed an Excerpt Include macro inside the IFTTT macro to include the module page (see example code 2 and 3).

Unfortunately this does not work: Created records on new pages seem to be assigned to the module page. Each new page shows all records of all pages that have created before. (Instead of showing just the records that were created by a certain page.)

  • Is this behaviour by design and there is no solution for this use case?
  • Or did I do anything wrong?

 

Example code 1:

<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="da6051b9-f560-4fb5-809d-7be858bf474f" ac:name="confiform" ac:schema-version="1">
<ac:parameter ac:name="formName">f</ac:parameter>
<ac:rich-text-body>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="915087d3-63bd-4b31-9e3e-36e84496a173" ac:name="confiform-entry-register" ac:schema-version="1">
<ac:parameter ac:name="presetValues">p=[entry._page]</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<ac:structured-macro ac:macro-id="71394339-b7c8-4d1a-bd4d-5f394fb028e7" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">p</ac:parameter>
<ac:parameter ac:name="fieldLabel">p</ac:parameter>
<ac:parameter ac:name="type">page</ac:parameter>
</ac:structured-macro>
</p>
<p class="auto-cursor-target">
<ac:structured-macro ac:macro-id="eeb1beac-ade5-4cfb-9500-8de727cae54c" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">t</ac:parameter>
<ac:parameter ac:name="fieldLabel">t</ac:parameter>
<ac:parameter ac:name="type">text</ac:parameter>
</ac:structured-macro>
</p>
<ac:structured-macro ac:macro-id="8c4b8271-0333-4948-a8f7-6b6e025285b6" ac:name="confiform-ifttt" ac:schema-version="1">
<ac:parameter ac:name="action">Create Page</ac:parameter>
<ac:parameter ac:name="extras">[entry.p]</ac:parameter>
<ac:parameter ac:name="event">onCreated</ac:parameter>
<ac:parameter ac:name="title">[entry.t]</ac:parameter>
<ac:rich-text-body>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="ae720479-bf08-4549-bb47-8d93b1cd8480" ac:name="confiform-table" ac:schema-version="1">
<ac:parameter ac:name="formName">f2</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="a6d83aa5-9276-4daa-8de3-e78e47878ee6" ac:name="confiform" ac:schema-version="1">
<ac:parameter ac:name="formName">f2</ac:parameter>
<ac:rich-text-body>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="b8a7f920-7759-499c-8036-bd9ef599faf7" ac:name="confiform-entry-register" ac:schema-version="1">
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<ac:structured-macro ac:macro-id="d2cff2ba-6e00-492c-b975-1f15d4a9979e" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">e1</ac:parameter>
<ac:parameter ac:name="fieldLabel">e1</ac:parameter>
<ac:parameter ac:name="type">text</ac:parameter>
</ac:structured-macro>
</p>
<p class="auto-cursor-target">
<ac:structured-macro ac:macro-id="829ce07a-8799-4464-8107-eef89601283a" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">e2</ac:parameter>
<ac:parameter ac:name="fieldLabel">e2</ac:parameter>
<ac:parameter ac:name="type">text</ac:parameter>
</ac:structured-macro>
</p>
<p class="auto-cursor-target">
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">... Here the user has to add information (text, graphics) in edit mode. ...</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p>
<ac:structured-macro ac:macro-id="723be9a5-0e48-4d7a-be39-3295c8821727" ac:name="children" ac:schema-version="2"/>
</p>

 

Example code 2:

<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="da6051b9-f560-4fb5-809d-7be858bf474f" ac:name="confiform" ac:schema-version="1">
<ac:parameter ac:name="formName">f</ac:parameter>
<ac:rich-text-body>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="915087d3-63bd-4b31-9e3e-36e84496a173" ac:name="confiform-entry-register" ac:schema-version="1">
<ac:parameter ac:name="presetValues">p=[entry._page]</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<ac:structured-macro ac:macro-id="71394339-b7c8-4d1a-bd4d-5f394fb028e7" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">p</ac:parameter>
<ac:parameter ac:name="fieldLabel">p</ac:parameter>
<ac:parameter ac:name="type">page</ac:parameter>
</ac:structured-macro>
</p>
<p class="auto-cursor-target">
<ac:structured-macro ac:macro-id="eeb1beac-ade5-4cfb-9500-8de727cae54c" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">t</ac:parameter>
<ac:parameter ac:name="fieldLabel">t</ac:parameter>
<ac:parameter ac:name="type">text</ac:parameter>
</ac:structured-macro>
</p>
<ac:structured-macro ac:macro-id="8c4b8271-0333-4948-a8f7-6b6e025285b6" ac:name="confiform-ifttt" ac:schema-version="1">
<ac:parameter ac:name="action">Create Page</ac:parameter>
<ac:parameter ac:name="extras">[entry.p]</ac:parameter>
<ac:parameter ac:name="event">onCreated</ac:parameter>
<ac:parameter ac:name="title">[entry.t]</ac:parameter>
<ac:rich-text-body>
<p class="auto-cursor-target">
<ac:structured-macro ac:macro-id="4393c5a1-e810-451e-8703-2fb4cab1140d" ac:name="excerpt-include" ac:schema-version="1">
<ac:parameter ac:name="nopanel">true</ac:parameter>
<ac:parameter ac:name="">
<ac:link>
<ri:page ri:content-title="ConfiForms module"/>
</ac:link>
</ac:parameter>
</ac:structured-macro>
</p>
<p class="auto-cursor-target">... Here the user has to add information (text, graphics) in edit mode. ...</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p>
<ac:structured-macro ac:macro-id="723be9a5-0e48-4d7a-be39-3295c8821727" ac:name="children" ac:schema-version="2"/>
</p>

 

Example code 3 (module page):

<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="e434c9e6-aca3-4cb7-9d2b-b0377f4e8f56" ac:name="excerpt" ac:schema-version="1">
<ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
<ac:rich-text-body>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="ae720479-bf08-4549-bb47-8d93b1cd8480" ac:name="confiform-table" ac:schema-version="1">
<ac:parameter ac:name="formName">f2</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="a6d83aa5-9276-4daa-8de3-e78e47878ee6" ac:name="confiform" ac:schema-version="1">
<ac:parameter ac:name="formName">f2</ac:parameter>
<ac:rich-text-body>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="b8a7f920-7759-499c-8036-bd9ef599faf7" ac:name="confiform-entry-register" ac:schema-version="1">
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<ac:structured-macro ac:macro-id="d2cff2ba-6e00-492c-b975-1f15d4a9979e" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">e1</ac:parameter>
<ac:parameter ac:name="fieldLabel">e1</ac:parameter>
<ac:parameter ac:name="type">text</ac:parameter>
</ac:structured-macro>
</p>
<p class="auto-cursor-target">
<ac:structured-macro ac:macro-id="829ce07a-8799-4464-8107-eef89601283a" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">e2</ac:parameter>
<ac:parameter ac:name="fieldLabel">e2</ac:parameter>
<ac:parameter ac:name="type">text</ac:parameter>
</ac:structured-macro>
</p>
<p class="auto-cursor-target">
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>

 

2 answers

1 accepted

1 vote
Answer accepted

Hi

Not sure how to use the examples and what are you trying to illustrate, but I can tell you that the exerpt/excerpt include macros are rendered on the source page. Which means they have the same rendering context, no matter where you use them

In other words - this macro works like this "include rendered content from a page", and not like "include source and render"

Alex

Hi @Alex Medved _ConfiForms_ ,

thanks for your answer. Since I was not absolutely sure if the usage of virtual functions like "asEntryRef" or "asRef" in the ConfiForms macros might help, I just wanted to give the option to check the code I've used. Perhaps that was a bit of an exaggeration...

Anyway, your answer confirms my impression that there is no solution for my use case.

Best regards
Ulrik

Restrict edit permissions on the page - that is what you need to do anyway (to keep the form and data secure)

What you want to achieve is possible either with live template (adaptavist macro) / smart confitemplate (our templates macro) or a custom user macro

Like Ulrik Schoth likes this

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events