Hi,
is there any step by step documentation how i can integrate and email verification without joomla registration?
So actually i have the following things in my submit event:
-Save data
- Upload files
- Message
- Email to the user
What i need:
- Save data
- Upload files
- Message
- Email to the User with all informations which he
provided and verification link.
- After click on link update database record (e.g.
status „verified“)
- Thanks Message
- Email to me with provided informations
So how can i set up the link? I don't know what to do, so please can you explain it for a rookie...
Thanks,
Denny
Hi Bob,
thanks for your answer.
Sorry but i still don't understand how to add this new event etc..
The "new event" what should it be, custom code?
It would be perfect if you can give me an example like -> Go to the setup tab, choose "custom code" and so on.
Hope you can understand what i mean...
Thanks for helping
Denny
Hi Denny,
An 'event' here is a new processing page form your form - by default there are Load and Submit events set in the form Setup tab. You can add a new one using the Add Event box under the existing pages. There is a little more info on page 8 of the CFv6 manual.
Once you have created the event you can add actions to it to do whatever you need.
Bob
Hi Bob,
still don‘t get it :/
„You can add a new one using the Add Event box under the existing pages“
-> Where??
Denny
Hi Denny,
Scroll down the Setup tab. You will need to be in Advanced Designer mode to see the box.
Bob
Really strange..
I checked it in chrome and firefox,, latest cf6 version..
So will you check it and let me know if there is any solution?
Unfortunately it is a little bit urgent...
Thanks again,
Denny
Hi Denny,
There is nothing for me to check.
You can use a separate form if you like to capture the responses.
By all means PM me the site URL, form name and a Super Admin login and I'll take a quick look.
Bob
Hi Bob,
i've sended you a PM with login data.
Thanks,
Denny
Hi Denny,
It is there if you scroll to the bottom of the Setup tab a wait a bit - I have no idea why you get the secondary scrolling on the page. I have added a verify event for you.
Bob
Hi Bob,
thanks.
Did you saved the form? Cause i can't see your new event.
What i found is, when i minimize the load and submit event, i can see the field to add a new event...
Can you also help me how i have to the check the database, create the link and update the database?
That would be great...
Thanks,
Denny
you might want to have a look at the instruction manual and the demo forms, or pay someone to do it all for you
Maybe you're right, but in the demo forms i can't find any example for double-opt-in, same in the cf6 documentation.
In the older versions it was easy to setup double-opt-in cause of stuff like "verification sender" etc.
So i thought it would be great if Bob can help, if not, i have to try it by myself...
Use a Joomla user registration action. Put {uuid:} in the verification field or whatever it's called. Then send the user an email with a link with yourweb.com/linktoyourform?event=verify&code={var:registration_action_name.whatevertheverificationfieldiscalled}
If you do a test registration with debug after it you should be able to get the name of the field
Have a verify event in your form where you check the code anduodate the user record accordingly
If you search the forums Bob had a better explanation put up somewhere
But I don't want to use the Joomla user registration.
The only problem i have now:
I have create two more fields in my database ("status" and "link_id"):
1. How can i set the value after submit to status = "unconfirmed" and link_id = "1" (autoincrement?)
2. Create the link in submit event with special message after clicking the link
3. Check link_id with "Read Data" in verify event? And then Update Database to status = "confirmed"
You're not using Joomla registration you're using the Joomla registration ACTION that Chronoforms provides in the setup tab
You don't need to create any new fields Joomla #__users provides everything you need.
There is only:
Login
+ Save user
User activation
Save user, clearly.
User activation in the verify event
Yes you're partially right.
But in the demo forms is nothing like double-opt-in or am i wrong?
Also there is no real documentation for double-opt-in with examples. Or am i wrong too?
I'm still don't get the things done.
When you would do it, what would it cost?
Thanks,
I just told you everything you need. It's all there.
If you still need help I'll do it for you for $50 AUD.
Should be joomla_user16.activation
I changed it and link looks the same.
And where can i see if the user clicked the link?
You don't need to see where the user clicked the link, that's what the User Activation action does!
And 2 other things:
ONE: Fill in all the other fields in the save user action! Where's the password coming from? The username? If you don't have that set up properly, it won't work and it won't save the user and therefore won't HAVE an activation code to use!
TWO: USE A DEBUG ACTION so we can see what's happening. I guess your user isn't saving because you're not getting alll the necessary data.
Okay i think you did not understand correctly what i want.
Because of that i opened the topic.
In my form the user don't has to fill a username or a password. So i cant fill all fields in the save user action!
This form is for users who wants to request their data of different systems we made.
So he has to fill in name, system name, do some file upload etc.
After submitting the form we need this verfication / double-opt-in via link and it is important to see if the user has verified his email or not.
Right well yes looks like there was confusion. Delete user save and user activation.
Use a "custom code" action on the Submit event. Call it "verification_id", turn on "var only result" and in content put only {uuid:}
Save data action to save the code and email to your awaiting verification table or wherever you're saving the data, you need to add {var:verification_id} to the data you're going to insert so it can be matched later
The link you send will be as above, except use {var:verification_id} instead of {var:joomla_user16.activation}
In verify event, make sure that {data:vid} exists and if not display an error. If it does exist, do a read data looking for fieldname:{data:vid}. Under the not found event show an error, under the found event do a save data action where you UPDATE whatever field it is you need to update to show that the email has been verified.
We are getting closer to it! Thanks!
Now the link in my email looks great.
Now i just need to the verify event.
In added a field "vid" as int, default = null in my database.
1. make sure that {data:vid} exists -> how can i check this?
2. I have created the read data action, added the found event and choosed my database.
Should I enter in "Where conditions" ?
3. In the found event i added the save data action.
The data provider is {data:vid} and the write action "Update". Now i want that the vid in my database changes from null to 1. Do you know what i have to enter?
Actuall i'm getting an error after clicked the link (1054 - Unknown column 'Data18.{data' in 'where clause')
Data18 is my Read Data action.
NO, vid should be varchar 36 if vid is the code you want to check to make sure they've clicked the verification link.
1. Use a validate data event switcher: data source {data.empty:vid} with events true and false. Under the TRUE event, put your error message and a stopper IN THAT ORDER, Under FALSE, put everything else.
2. vid:{data:vid} exactly like that
3. Leave data provider empty. Override on update should have fieldname:1 where condition should be vid:{data:vid}
4. READ THE INSTRUCTIONS http://www.chronoengine.com/chronoforms/download?conn=downloads2&event=downloadfile&fname=forms&fversion=6&ftype=manual&fplatform=j25
Why would the vid field be empty? What did you do in the submit event?
I just did everything you said..
"Use a "custom code" action on the Submit event. Call it "verification_id", turn on "var only result" and in content put only {uuid:}"
And what about the link you're sending in the email, the link you're clicking on to verify, what does that look like?
The link looks like:
https://mydomain.de/some_site_name?option=com_chronoforms6&chronoform=datenschutz&event=verify&vid= {var:verification_id}
So that's what you have in the body of the email event? Or are you literally typing that into the address bar?
Yes right, this is in my body of the email action.
Some text
the link
and all of the fields
My Submit event looks like:
Validate Fields
on success;
- custom code
- save data
- upload files
- email
- message
- debugger
Verify event:
Validate Data
on success:
- Read data
FOUND
- Save data
And what does the link look like after you get it in your email?
...................?option=com_chronoforms6&chronoform=datenschutz&event=verify&vid= af0669c4-2d0e-4ca4-8333-1fa1d4b4f633
Right well absolutely no reason why {data:vid} should be empty
Hi Bob,
yes true, i deleted it.
But the field is after clicking the link empty.
Should i setup the vid field special with something in the submit event?
Maybe you can have a quick look?
Any idea why the field is empty after clicking the link?
Thanks
Denny
Hi Denny,
What field is empty? Does your verify event display anything?
I see that there is no Data provider entry in the Save data action, is the record being updated?
Adding a Debugger action will help you see what is going on.
Bob
Hi Bob,
i'm actually not sure what i have to do.
I just need the field vid updated to 1 after the user verified his mail. so i can see that he has verified.
I just did everything what healyhatman said.
Can you please have a quick look? I think for you it is a "problem" which is solved in less than 5 minutes.
Hi guys,
is there any update?
Need this to run...
Thanks for your support.
I keep telling you to read the instructions and you keep not doing it.
But anyway you're telling it to update the database where the vid is equal to the verification code you sent in the email. But have you ACTUALLY saved that verification code to the database? If not, how is it going to find the right row to update? And what if a user then changes the link in the address bar to vid=1 ? It will make your database update every row with vid = 1!
I'll do it for you for $50 AUD. It's not hard but you need to have a basic understanding of what it is you're trying to accomplish.
I just want to understand it. For me it would be much more easier if there were any special example or demo. But there is no one.
Or do you have any example where is this topic explained?
When i save my database after submitting the form i just set vid:0.
After clicking the link i just want to update vid:1, and this is the only thing which is not working.
I think $50AUD is expensive cause i just bought keys for chronoforms and thought there is some support or help. Do you understand what i mean?
There IS support and there IS help. You're just asking people to just build your form for you. There are demo forms for saving data and for reading data, there's the instruction manual, but there's not going to be a demo for exactly what you want to do in the exact way you want to do it - there'd be billions of demo forms!
I will tell you one more time what you need to do. If you read the instructions you will be able to figure out how to do it, or you can pay me to build it for you. I don't work for Chronoengine so I'm under no obligation to give you even the help I've given.
STEP ONE
User fills in form, clicks submit.
IN SUBMIT EVENT
Generate a UUID code (the custom code block I told you to make)
Save the code to the database along with the email address - you need to do this so when the user clicks the link in their email, you know you're verifying the right user
Send the email to the user, with the code as part of the link they're clicking (like I told you to)
STEP TWO
User receives email, clicks verification link
IN VERIFY EVENT
Make sure {data:vid} exists and if it doesn't show an error
Read Database, look for the row where verification code = {data:vid}
IF FOUND: UPDATE action: set verified to true/1 , set the verification code field to {value:null}, update condition being where verification_field_name:{data:vid}
IF NOT FOUND: Show an error message saying they've made an invalid request.
The end!
You still need to save the verification_id to check against!
In your save data action in your SUBMIT event ADD verification:{var:verification_id} to the data you're inserting
In your read data in the verify action change vid:{data:vid} to verification:{data:vid} and change the select type to first matching
In the save data action change the update condition to verification:{data:vid} and ADD verification:{value:null} to the Data override on Update
And just to make sure - this form you're building, the user has to be logged in to use it right?
In your data table vid should be BOOLEAN and verification should be VARCHAR 36
i will try. Thanks,
No, no one should be logged in!
maybe this is the real misunderstanding:
"And just to make sure - this form you're building, the user has to be logged in to use it right?"
So if the user shouldn't be logged in, what do i have to change?
Well if they're not logged in, why do you have a user id field in your save data action?
And no I've been operating under the assumption that the user isn't logged in so no misunderstanding on my side.
This user id field is standard when you use the save data action.
Now everything works...
GREAT!
Once again, thanks for helping me out!
One last question.
I've got an email action in my VERIFY Event after saving/updating my database.
I just want in my email all form fields to display -> i did the same in my email action in my SUBMIT event with {AUTO_FIELDS} .
But with my mail from my VERIFY Event it does not work.
Do you know why? Or is there a special way how to show all form fields in the email?
Because none of that data exists anymore, and unless you save it all to the database in SUBMIT and load it all in VERIFY you can't get it.
You could have the submit event display a second page (section) with a verification code text field and have them instead of clicking a link copy the code from the email to the text box and when they click submit it fires the VERIFY event.
Thanks @healyhatman, but this will not be the solution we want to use.
So i have to do some custom code to read the data when the user is verified that to give it to our representative?
Okay. So i will do input another read data action in my verify event after the save data.
Filtering settings -> Where conditions ->
verification:{value:null}
vid:1
Data settings - > Select type -> All matching records
And then in FOUND my Email action.
But what should i write in my body?
Whatever you want. No more free help.
Ok Ok... Sorry that i'm asking😀
Hi Denny87,
Please stop and think through the logic of what you are doing here.
When the user clicks the verify link you can use a Read data action to load a record that matches the verify code. If a record is *not* found then 'do something'; if it *is* found then you have all the matching data loaded and can include that in an email.
Bob
Hi Denny,
Please try changing your site admin template to protostar if it is not already set and see if that makes a difference.
Bob
Hi Bob,
I have already everything, i just was asking how i can call my data in my mail.
I did it with {var.pr:read_data33} and it works. But i want it to style like {AUTO_FIELDS}, and that is the only problem which i have.
Hi Denny,
No sign of a PM from you - did you send it to Admin instead of me?
Bob
Hi Bob,
Sorry? What should i send to you?
Denny