How do I concatenate text and field values in Confiforms?
Asked by Scott Franz:

I have a form with two fields. The first field you enter your name. I want to the second field to display "Hi name, how are you?". My actual use case will have multiple fields all entering in to the final display field.


Answers:
author: Alex Medved _ConfiForms_
body: Hi [@Scott Franz](/t5/user/viewprofilepage/user-id/5353144)

Where do you want fields to concatenate? I mean where do you want to use a concatenated value?

The simplest option is to use a formula field with CONCAT function

Alex

comments: author: Scott Franz
body: I just want them to display concatenated so I can copy and paste the whole thing to something else after they're all concatenated.


author: Alex Medved _ConfiForms_
body: Do you want to do that while entering data in the form or after you have submitted the form?


author: Scott Franz
body: After submitting. So enter all the values, hit submit, produce the output.


author: Alex Medved _ConfiForms_
body: Use the formula field with a [CONCAT](https://wiki.vertuna.com/display/CONFIFORMS/Supported+math+operators%2C+formulas+and+functions) function then, as suggested in the first comment


author: Scott Franz
body: It doesn't like that the field is empty to start with. Is there a way to make the formula field definition wait until it's submitted?


author: Scott Franz
body: Maybe it would be best to give you the whole project. I have this in Excel and it works, but I want it in a Confluence page (not as embedded Excel).   

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


author: Alex Medved _ConfiForms_
body: Not sure I understand your comment prior to one with a screenshot... Formula field is calculated AFTER form is submitted

May be a simple ListView will make more sense. Anyway, let me give you an example below

Demo:

<http://recordit.co/sZhjCgOCxF>

Configuration:

```
<ac:structured-macro ac:macro-id="810e61d8-1787-4507-9b91-d5066221338c" ac:name="confiform" ac:schema-version="1">
<ac:parameter ac:name="formName">form</ac:parameter>
<ac:rich-text-body>
<ac:structured-macro ac:macro-id="4e69f5f4-5272-4b59-8650-bf5c2944dab8" ac:name="confiform-entry-register" ac:schema-version="1">
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p>
<ac:structured-macro ac:macro-id="ea1ff18e-80eb-45de-bba8-f5f7ec455b90" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">f1</ac:parameter>
<ac:parameter ac:name="fieldLabel">f1</ac:parameter>
<ac:parameter ac:name="type">text</ac:parameter>
</ac:structured-macro>
</p>
<p>
<span>
<ac:structured-macro ac:macro-id="b484f7e7-dba3-475a-a555-c81d0fa92488" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">f2</ac:parameter>
<ac:parameter ac:name="fieldLabel">f2</ac:parameter>
<ac:parameter ac:name="type">text</ac:parameter>
</ac:structured-macro>
</span>
</p>
<p>
<span>
<ac:structured-macro ac:macro-id="65e94af5-95b3-4376-8e36-a5971166da55" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">formula</ac:parameter>
<ac:parameter ac:name="fieldLabel">Formula</ac:parameter>
<ac:parameter ac:name="extras">CONCAT("Hello [entry.f1]. Nice to meet you. ", "See you and [entry.f2]")</ac:parameter>
<ac:parameter ac:name="type">formula</ac:parameter>
</ac:structured-macro> formula</span>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p>
<br/>
</p>
<ac:structured-macro ac:macro-id="a575a3da-92cc-4244-9af5-a8fb02f04bbb" ac:name="confiform-table" ac:schema-version="1">
<ac:parameter ac:name="formName">form</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p>listview approach</p>
<ac:structured-macro ac:macro-id="cd42467a-2cfe-4361-b885-99830d6de8a9" ac:name="confiform-list" ac:schema-version="1">
<ac:parameter ac:name="formName">form</ac:parameter>
<ac:rich-text-body>
<p>Hello [entry.f1]. Nice to meet you. See you and [entry.f2]</p>
</ac:rich-text-body>
</ac:structured-macro>
<p>
<br/>
</p>
```

You decide what makes more sense for you

Alex


author: Scott Franz
body: Oh, I see what you're saying now. I will give that a go, it should work, thank you!


Tags: confiforms

confluence-server

server