Forms, how to get the referer page for the mail message

I have a form which will be displayed on many pages. It will reflect registration-requets for what is offered on the page, where the form is positioned.

The receiver of the mail/registration-request should at least know, from what page this request is coming, since the very same form is getting reused. Ideally I would be able to put information from the page-properties to the mail message.

I didn’t find any documentation on how this could be achieved.

Moin Daniel,

I hope this helps. It was Bastians answer of my similar question.

I implemented it as follows:
prototype(Neos.NodeTypes:Form){
overrideConfiguration = Neos.Fusion:RawArray {
finishers = Neos.Fusion:RawArray {
# first finisher
0 = Neos.Fusion:RawArray {
# finisher options
options = Neos.Fusion:RawArray {
variables = Neos.Fusion:RawArray {
pageTitle = ${q(documentNode).property(‘title’)}
datum = ${Date.Format(q(documentNode).property(‘workshopDatum’),‘d.m.Y’)}
zeit = ${q(documentNode).property(‘workshopZeit’)}
preis = ${q(documentNode).property(‘workshopPreis’)}
veranstalter = ${q(documentNode).property(‘workshopVeranstalter’)}
ort = ${q(documentNode).property(‘workshopOrt’)}
}
}
}
}
}
presetName = ‘bootstrap’
}

and in the email.txt file:

{pageTitle}

Datum: {datum}
Zeit: {zeit}
Kosten: {preis}

Best wishes,
Paul

Awesome, thanks a lot for your help. This did the trick for me.

I have now this fusion-definition:

prototype(jobe.drsch:contactForm) < prototype(Neos.NodeTypes:Form) {
presetName = 'drsch'
formIdentifier = 'contactForm'

overrideConfiguration = Neos.Fusion:RawArray {
	finishers = Neos.Fusion:RawArray {
		#second finisher
		1 = Neos.Fusion:RawArray {
			# finisher options
			options = Neos.Fusion:RawArray {
				variables = Neos.Fusion:RawArray {
					pageTitle = ${q(documentNode).property('title')}
					startDate = ${Date.format(q(documentNode).property('startDate'),'d.m.Y H:i')}
					link = Neos.Neos:NodeUri {
						absolute = true
						node = ${documentNode}
					}
				}
			}
		}
	}
}

}

This get’s added to the content-definition where I need it:

prototype(jobe.drsch.myPage) < prototype(Neos.Neos:Content) {
...
	content {
	    form = jobe.drsch:contactForm
    }
...
}

Finally the form is added to the template simply like that:
{content.form -> f:format.raw()}