Forums

Registration form - Email to admin doesnt include user data

pranky 23 Mar, 2019
Hello
I've set in the success block send an email to the admin.
I need all the new user data in this mail so I've set "AUTO ADD FIELDS DATA" but I receive the mail without data.
How can i fix this?
Any help would be appreciated
Thx
healyhatman 23 Mar, 2019
Does the email to the user include it? Is it a multi-page form?
pranky 23 Mar, 2019
Does the email to the user include it? Yes
Is it a multi-page form? No, it's a registration form derivated
from the demo one
pranky 25 Mar, 2019
I've added the debugger and made another test
The debugger doesnt' help me but maybe it can be useful for someone who want to help me...
GreyHead 25 Mar, 2019
HI pranky,

The Debugger output doesn't show any data either so the Email is correct. It looks as if there is a multi-step process here and the form data is not being carried forward to the final step.

Bob
pranky 25 Mar, 2019
Hi greyhead, thank you but...

ehhmmmmmm 🤗 what can I do? I see no light at the end of the tunnel!🤣🤣

thx again for support
healyhatman 25 Mar, 2019
Just make the email body yourself. Put the data you need in the email like this for example
User name: {var:joomla_user_activation6.name}
GreyHead 25 Mar, 2019
Hi pranky,

Two choices here I think:

+ you can send an email when the form is first submitted including the data from the form - but at that point validation is not complete.

+ you can send an email after the validation is complete but in that case you need to look up the data using the new User ID which you do have in the Debugger output - if you only need the user name and email those are also there.

Bob
healyhatman 25 Mar, 2019
There's no form data because there's no form Bob it's a user verification action
pranky 25 Mar, 2019
"There's no form data because there's no form Bob it's a user verification action"
I think that doesn't change GreyHead suggestions, isn't it?


(Do u think that this "issue" could be a suggestion for dev?)
healyhatman 25 Mar, 2019
It's not an issue it's a misunderstanding on your part. Auto add fields won't work because there are no fields. Do what I said earlier.
pranky 25 Mar, 2019
@healyhatman

I dont want bother you... can you make me another example for the field "company" for example? I dont understad how apply the syntax you suggested me to the design fields...
User name: {var:joomla_user_activation6.name}
thank you
healyhatman 25 Mar, 2019
If you look at the debug, that will show you all the data you have available to you. Company isn't one of those because you're on a completely different 'page'.

Registration form -> submit event


In the submit event I assume you're sending an email to the user with a link they click on to activate their account, right? Well when they click on the link they're on a completely different "page" and none of the form data is available. That's the way the internet works, this is not a Chronoforms "issue". Saving to session is no good because they could click that link at any time and the session could've expired by then.

What it sounds like you're going to need to do is in your submit event save the user, save the form data and the new user id to the database, and in your activate event after they successfully activate you'll need to use a read data (set to first matching) to get the data you want back out of the database.
This topic is locked and no more replies can be posted.