Definitions on one page, forms and email on another
Asked by Frank Boisvert:

I've got everything working with definitions on one page and the forms on another. Email works when I have the email macro inside definitions macro on the definitions page, but not when I put the email macro into the registration control on the forms page. This is what I would like though, since each page will be used for a different request, and therefore will be spitting out a different email to the requester.

TL;DR: How do I put the definitions on one page, and have the email macro on another? Is this possible?


Answers:
author: Alex Medved _ConfiForms_
body: > TL;DR: How do I put the definitions on one page, and have the email macro on another? Is this possible?

ConfiForms Form Definition consist of Field Definitions and IFTTT macros

This is how you define your form fields and the behaviour your form has

This shall be on one page and within a ConfiForms Form Definition macro body

Now.. you can place anywhere in Confluence server the ConfiForms Registrations Control (FormView) macro and reference a page and the form where you have defined the form in order to show it

And as Paul has mentioned, each of your ConfiForms Registrations Control (FormView) macros (as you can have multiple entry points to your form definition) can have own defaults values

comments: author: Frank Boisvert
body: That's what i'm asking.

On a page called Definitions I have the ConfiForms Form (Definition) macro, and on another page, called Moves, I have the Registration Control and all the forms for the user to input.

How do I reference the IFTTT Integration Rules the page called Moves? I can't figure that out. I can reference my ConfiForms Form (Definition) macro from the Moves page, but I can't figure out how to reference the IFTTT macro from the Moves page.


author: Alex Medved _ConfiForms_
body: ConfiForms IFTTT Integration Rules macros are **part of ConfiForms Form** definitions, they describe the behaviour your form has and, in your case, they shall be on the "Definitions" page, **inside the form they belong to**, and not on the "Moves" page

In ConfiForms IFTTT Integration Rules macros you define when a certain handler/rule shall be called (conditionally) and what rule it is.


author: Paul Ward
body: add a hidden field definition, set it to different values in each registration macro:

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

(in my case I have used true in one rego, false in another, but you could use any values you like)

Put your multiple email macros back with the definition and in each add a condition based on the value of the field:

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

(voters please help answer some of my outstanding questions :-) )

comments: author: Frank Boisvert
body: Oh man, i'm super new here... Any way you can spell that out for me?

I can add the hidden field definition, but not sure about "set it to different values in each registration macro". I already have:

```
name=[user.fullName] & email=[user.email]
```

in the "Set values as key=value".... field in the registration control. Can I have multiple things in there?

```
name=[user.fullName] & email=[user.email], isOption1=true&F1[user.email]
```

So i'll need an email macro on the definitions page for each email I want to send out depending on which page they use? There's no way to put each one on the appropriate page? Not really a problem, i just think it will be confusing since we're gonna have a dozen or so separate request pages.


author: Paul Ward
body: at the meoment I am using one IFTTT macro for each email I want to send, but I too would prefer to have single macro and format the content inside another - I have in fcat done this in an IFTTT macro Run Javscript action but can not get it to change the value of a form field so am stuck... I have my own open question on this forum to try to solve that but no responses yet

To your first question you need this:

```
name=[user.fullName] & email=[user.email] & isOption1=true
```

(of course replace iSOption1 with whatever you call your hidden field and true with whatever value you want to test for. Perhaps:

```
name=[user.fullName] & email=[user.email] & emailrequesttype=contactus
```


Tags: confiforms

confluence-server

server