Hi, I've been checking guides in other section and glad that I found what I want, but still having problem with it. I added in a confirmation page after the form. on confirm I added a DB MRL to check that no multiple fields are duplicated to register at joomla! registration, then db save finally show a thank you message. The form was filled then submitted, confirmation page show up but with the buttons on the right side of the data(cancel button or back button ?).Unfortunately, the thank you message didn't show up,no registration and the db is not saved. I guess there's something wrong within DB MRL event.. Mind anyone help me to check ?
[attachment=1]Capture2.JPG[/attachment]
[attachment=0]Capture3.JPG[/attachment]
Need help on this one ! Many thanks !
*the custom code and stopper it's for me to check where it ends.That's all I can find out.(still a PHP newbie) 😢
Hi lovemepease,
First, I stronlgy suggest that you don't nest actions using the On Success events. If there is nothing in the On Success event then the next action in the parent event is run. It's much simpler, and more reliable, to use the parent On Submit event as much as possible.
Second, you don't need a DB Multi Record Loader to check if one record exists. In fact I would just use a simple MySQL query in a Custom Code action and not even the DB Record Loader.
Third, you should run the validation check before you run the Confirmation Page, there is no point in confirming un-validated data.
I suggest that you re-build this one step at a time checking the logic and the correct working at each step. Once you have a complex structure like this it gets tought to debug easily.
Bob
PS The misplaced buttons are most likely from an unclosed tag somewhere in the confirmation page code.
hi Bob,
*Thanks for the first instruction, finally all worked out perfectly. To verify that the username cannot be duplicated in the user manager, what mySQL code should i use ? also since I also have 2 password box(password and verify password), i tried some other codes but it didn't work. what simple code can be used to validate both fields must be same before entering the confirmation page ?
*NOT perfectly until I accidentally delete the form.😟 Always tend to click wrong things... 1st try was successfull (removed DB MRL, on Confirm are Joomla! registration, DB save and thank message separately). Until i recreate the 2nd form using a previous backup, add in codes into the confirmation message and thank message, suddenly popped out registration error. Checked the user manager non was created, db also wasn't recorded. Am I missing something from the previous event action ?
Finally found the problem that preventing me from registering a user into Joomla! I tried on the Joomla! registration itself, filled in the same data from my form.
[attachment=0]Capture1.JPG[/attachment]
How to temporary disable the mail function? Because I haven't finished the form yet until I upload it onto a public domain. Until that time, the mail function wouldn't work.(SMTP also disabled previously, that's why.)
Hi lovemeplease ,
Hmmmm . . .only by going in and hacking the code, not advised. Can you temporarily link the site mailer to a Gmail account to get it working enough to test?
Bob
Hi Bob,
I tried with my own gMail it still fails.In the mailer option, if I use PHPMail, it will show the previous post error. If I use sendMail, it will show the below error.(last option SMTP)
[attachment=1]Capture1.JPG[/attachment]
[attachment=0]Capture.JPG[/attachment]
Previously before I even started any of the forms, the registration itself works fine without email validation/activation.
Hi lovemeplease ,
If there isn't an SMTP server on localhost then you'll need to set up GMail as your SMTP server.
Bob
Hi Bob,
Is there other alternative way besides using SMTP? Because the system will be moved to another domain once finished. Now it's just basically setting up the web pages and the form only.
Hi lovemeplease,
That's really up to you. If you develop on a site without a mail server then you are going to have problems like this.
Bob
Hi Bob,
Ok, I tried on my friend's domain with the form, it seems it can't throw in the data into the Joomla! registration. It kept on stuck at the Joomla! registration action event. Mind if you can help me check the form ? should I upload the .cf4bak file ?
Hi lovemeplease,
Yes Ok, Please take a Form Backup using the icon in the Forms Manager and post it here (as a zipped file) or PM or email it to me and I'll take a closer look.
Bob
Hi Bob,
I'm not sure whether I did send a PM to you. if it doesn't, here's the zipped cf4bak. Thanks for your help !
Hi lovemeplease,
If you add a Debugger action just before the Joomla! Registration action you will see that none of your form data is available there. Just before that you have a Data to Session action - I think that needs to be s Session to Data action to get the data back from the session.
Bob
Hi Bob,
Thanks alot !Because I referred from other thread for the use of"data to session/session to data", I thought of using mutlipage to do this registration but it seems much too complicated. Additionally, I not too sure about the functions of D2S/S2D.
Million thanks from you!(I wish I could buy you a beer).😀
Yet, it's still unfinished because I have to allow user to login and view their own personal details and also for the admin/superuser to modify some data.(which now I having problem with CCv4). I saw a thread that you can catch specific row of data for specific logged-in user. Allow me to post my questions here or at the CC section ?