ConfiForms macros used in line with text
Asked by Aleks R:

It would be helpful if ConfiForms view macros (those allowing macros/content in body, such as ListView) could generate content in line with text. To my knowledge, only ValueView will generate content in line with text.

Is it possible to achieve this somehow? Any workarounds [@Alex Medved _ConfiForms_](/t5/user/viewprofilepage/user-id/781630)

I am looking to produce a link to entryviewer in line with text, while allowing another field to be tooltip (text shown on hover).

Below is screenshot and sample code:

![Capture2.PNG](/t5/image/serverpage/image-id/279184iEBA74E7B2F74A6BB/image-size/large?v=v2&px=999 "Capture2.PNG")

```
<ac:structured-macro ac:macro-id="2a6a0f41-9be9-4a27-9035-a5557c249b38" ac:name="confiform" ac:schema-version="1">
<ac:parameter ac:name="formName">hobbies</ac:parameter>
<ac:rich-text-body>
<p>
<ac:structured-macro ac:macro-id="5a841e50-1e92-4091-934a-efa344a9abf4" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">name</ac:parameter>
<ac:parameter ac:name="fieldLabel">Name</ac:parameter>
<ac:parameter ac:name="type">text</ac:parameter>
</ac:structured-macro>?<ac:structured-macro ac:macro-id="c45008cd-9783-4b84-9a8f-8a31c153c7dd" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">hobby</ac:parameter>
<ac:parameter ac:name="fieldLabel">Hobby</ac:parameter>
<ac:parameter ac:name="type">text</ac:parameter>
</ac:structured-macro>
</p>
<ac:structured-macro ac:macro-id="a981a35f-d452-45b1-a2ca-b638f2e1f0a8" ac:name="confiform-entry-register" ac:schema-version="1">
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
</ac:rich-text-body>
</ac:structured-macro>
<ac:structured-macro ac:macro-id="da9c4680-9462-4489-bb74-83b0e71eb674" ac:name="confiform-table" ac:schema-version="1">
<ac:parameter ac:name="formName">hobbies</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p>
<br/>
</p>
<p>Now showing link to entryviewer for one record in the form, ideally showing field "name" as link to entryviewer, with field "hobby" as a tooltip. This works, but cannot be generated in line with text. Is it possible to generate in line with text through a workaround?</p>
<ac:structured-macro ac:macro-id="e6e94fa2-5b10-47c3-b10c-81f869ea3a21" ac:name="confiform-list" ac:schema-version="1">
<ac:parameter ac:name="filter">name:Aleks</ac:parameter>
<ac:parameter ac:name="formName">hobbies</ac:parameter>
<ac:rich-text-body>
<ac:structured-macro ac:macro-id="f7b8d894-1b6d-4752-9503-e16799dca27a" ac:name="div" ac:schema-version="1">
<ac:parameter ac:name="title">[entry.hobby]</ac:parameter>
<ac:rich-text-body>
<ac:structured-macro ac:macro-id="4e6812f5-d5f9-4c9f-a230-044240c3a628" ac:name="confiform-entry-viewer" ac:schema-version="1">
<ac:parameter ac:name="type">Link</ac:parameter>
<ac:parameter ac:name="buttonLabel">[entry.name]</ac:parameter>
<ac:rich-text-body>
<p>Name:?<ac:structured-macro ac:macro-id="4f0fef28-8c3d-4dc3-99c2-f81ca732b1f1" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">name</ac:parameter>
</ac:structured-macro>
</p>
<p>Hobby:?<ac:structured-macro ac:macro-id="5138e7b2-86e1-44b3-a268-c21cfa5d6b52" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">hobby</ac:parameter>
</ac:structured-macro>
</p>
</ac:rich-text-body>
</ac:structured-macro>
</ac:rich-text-body>
</ac:structured-macro>
<p>
<br/>
</p>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
```


Answers:
author: Alex Medved _ConfiForms_
body: Hi [@Aleks R](/t5/user/viewprofilepage/user-id/5272502) and welcome to this community

You can inline data from ConfiForms forms... no problem there

Have a look at this demo

![Screenshot 2023-09-07 at 11.40.42.png](https://community.atlassian.com/t5/image/serverpage/image-id/279263i9E54485A420A6FDB/image-size/large?v=v2&px=999 "Screenshot 2023-09-07 at 11.40.42.png")

This is how it's built

![Screenshot 2023-09-07 at 11.40.48.png](https://community.atlassian.com/t5/image/serverpage/image-id/279264i6F3DCF7D6F7EC4CD/image-size/large?v=v2&px=999 "Screenshot 2023-09-07 at 11.40.48.png")

If you want to inline the EntryViewer macro output then consider redefining this CSS

```
<style>.cf-view-controls  { display: inline !important;}</style>
```

Hope it helps

Alex

comments: author: Aleks R
body: Thanks! Getting closer.

Can you do the same as what you suggested for class .cf-view-controls, but forcing the whole list view to display inline?

I am looking to put the below code in a user macro and then allow it to display inline.

```
<ac:structured-macro ac:macro-id="e6e94fa2-5b10-47c3-b10c-81f869ea3a21" ac:name="confiform-list" ac:schema-version="1">
<ac:parameter ac:name="filter">name:Aleks</ac:parameter>
<ac:parameter ac:name="formName">hobbies</ac:parameter>
<ac:rich-text-body>
<ac:structured-macro ac:macro-id="f7b8d894-1b6d-4752-9503-e16799dca27a" ac:name="div" ac:schema-version="1">
<ac:parameter ac:name="title">[entry.hobby]</ac:parameter>
<ac:rich-text-body>
<ac:structured-macro ac:macro-id="4e6812f5-d5f9-4c9f-a230-044240c3a628" ac:name="confiform-entry-viewer" ac:schema-version="1">
<ac:parameter ac:name="type">Link</ac:parameter>
<ac:parameter ac:name="buttonLabel">[entry.name]</ac:parameter>
<ac:rich-text-body>
<p>Name:?<ac:structured-macro ac:macro-id="4f0fef28-8c3d-4dc3-99c2-f81ca732b1f1" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">name</ac:parameter>
</ac:structured-macro>
</p>
<p>Hobby:?<ac:structured-macro ac:macro-id="5138e7b2-86e1-44b3-a268-c21cfa5d6b52" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">hobby</ac:parameter>
</ac:structured-macro>
</p>
</ac:rich-text-body>
</ac:structured-macro>
</ac:rich-text-body>
</ac:structured-macro>
<p>
<br/>
</p>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
```


author: Alex Medved _ConfiForms_
body: Not sure what are you asking...


author: Aleks R
body: I would like to have a ++user macro++ that takes a string parameter as input. Based on this, the user macro should display information ++in line with text++ based on a filtered lookup in a ConfiForms table.

Like so:

![1.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/280703i894A4A63A7379C81/image-size/large?v=v2&px=999 "1.PNG")

This should display as follows:

![2.png](https://community.atlassian.com/t5/image/serverpage/image-id/280704iBD0F5BCB090B1382/image-size/large?v=v2&px=999 "2.png")

Finally, clicking the result output from the user macro should display EntryViewer for record in question.

**In summary:**

1. User macro with string input should display value from ConfiForms table (say from field \[entry.field1\])

2. Tooltip should display field value from another field (say from field \[entry.field2\])

3. Clicking the generated value from user macro should bring up EntryViewer for record in queston in ConfiForms table.

I am able to achieve this, but NOT while allowing result to display in-line with text. Any way to achieve this while allowing generated result to display in-line?


Tags: confiforms

confluence-server

server