Form ID in an e-mail to owner doesn't work

My Mautic version is: 4.4.10
My PHP version is: 8.0.30
My Database type and version is: Mariadb 10.6

I’d like to receive an e-mail when an new contact comes over a form.
It works for the contact fields, but i’m not able to transmit the form ID (i want to know from which forms the new contact comes)

The following mail:
Ein neuer Kontakt ist am Start. Angemeldet übers Formular
{contactfield=firstname} {contactfield=lastname}
E-Mail: {contactfield=email}
Kontakt ID: {contactfield=id}

Formular ID: {form=id}

Brings that result:
Ein neuer Kontakt ist am Start. Angemeldet übers Formular
Oliver Txxxxx
Kontakt ID: 2XXX7

Formular ID: {form=id}

The synthax {form=id} doesn’t work.

I’d like to know from which form someone comes - any idea how to realise (or is this a bug?)

not sure, that this is a supported short code.
You can insert any field from the form itself like this: {formfield=fieldname}

So you could create some JS Code in an HTML field and write the form ID in a hidden form field.

Wait - are you sending this a a form action or campaign action? The form action would be added to each form individually. So you could basically “hard code” this for each form action.

Also - if you would work with web hooks, you will get all relevant data. Instead of sending an email, I suggest to level up and use a low code platform that can handle webhooks like Tape (Marketing Automation with Low Code - twentyZEN).

We build Inboxes with status for clients based on that concept. So they directly see which requests they already answered etc. Of course it could also be integrated with any other system you use that provides an API. Connection can be done via NodeRed (OpenSource) and other systems.

Some Screenshots to give you some idea for the Tape approach:

Just add a hidden field with a prefilled value.

1 Like

Ah - hidden field in the form.

Please give me some more information:
I found the hidden field - but do i have to assign it to a contact field?
If yes, i have to make a new contact field for this function?

Depends if you need to save this info or not on the contact level. Or just see it in the results list. (Or in the email you send)

I want only the info in the email. Not saving in the contact.

Can you tell me how to do, pls?

Sure, you need to make hidden field:

Name your field whatever and dd default. This will be always filled out in your form.

Can be empty, because you won’t save it.

Thats it.

The hidden field is not visible, but it will be shown in the results:

You can also see use this field in the email notification:

Good luck!

First - great support.

But it doesn’t work. What made i wrong?

Database result of the form

Hidden Field

e-Mail template in Mautic:

e-Mail Mautic

In the Mail i get stands this:

Hallo Stefan

Ein neuer Kontakt ist am Start. Angemeldet übers Formular
Stefan Franz
Kontakt ID: 1995

Form Name: {formfield=form_name}

(unfortunately not the name of the form - the entry of the hidden field)

Are you sending it as a form action or campaign action?

It’s a campaign form
The last step at the bottom should send the info of which form (or if it is somehow possible of which campaign) the new contact comes.

At the end i want to know in the e-mail i get on every new user, from where he comes.

If it’s a campaign form, then you need to save the field for the contact.
Otherwise Mautic wouldn’t know where to look for this info :slight_smile:

However the Twig Templates plugin allows you to do this, but I’m not sure you want to use it JUST because of this. It’s just so much easier to save this info.

Later you’ll be able to use this it for reports as well. You 'll be able to see how many conversions you have per form.

1 Like

Now it works - With a field in the contact.
Thanks for your tip