Hello,
I am using the CF_CB Plugin and a complex form to register a user with Joomla/CB, but there is no auto-login feature in the CF_CB Plugin. I am not an expert PHP coder so am not sure how to get the user to auto login on form submit.
I could either:
1) Add this ability to the CF_CB Plugin (hard) I have had a little look and am overwhelmed;
2) Modify the CF_Joomla Plugin so it only uses auto login feature but doesn't try to REGISTER the login details (!) I have tried using this after the CF_CB Plugin but I get errors because it attempts to register the same user logon details as the CF_CB Plugin just did (hard);
3) Use the CF_Redirect Plugin. Would I be able to get this to work? I know all the variables, I'm just not sure how to put the POST Url into a meaningful form (or whether this is even possible).
I am researching all over the Internet currently. Anyone's help would be great! Thanks!
Hi,
I'd have to dig a little for the actual code, but you should be able to add the actual logon-code (as used in the CF_Joomla registration plugin) in the "extra after onsubmit" box.
I'll see if I can't dig up the actual code, and get back in a day or two..
/Fredrik
Thanks Fredrick! I was hoping that was the case, but when I look at the CF_Joomla plugin code I go a little cross-eyed trying to figure out what I should transplant across into my CF_CB plugin lol.
Many Thanks
Hi Fredrik
How did you go digging up that code for me? 😀
Thanks
Hi Fredrick, thanks so much for getting back to me.
I am guessing that the values $params->get('username', and $params->get('pass' are supposed to be changed to my Chronoform's field ID's? e.g. My username field in my form has an ID of 'private_username' etc
I have done this, and placed the code into my CF_CB Plugin's 'Extra after onsubmit code', but it hasn't worked. In fact it just behaves as it used to, no change or error code or anything.
Because I have a multipage form, it doesn't need to go into my 'master' multipage form instead does it?
I'm going to keep trying a few different combinations and see what happens. In the mean-time, any other thoughts? Am I doing things right?
With Thanks
Hi,
No, you should not edit those, they should be litterary 'username' and 'pass'. This allows the script to retrieve the proper form field names from your plugin setup, hence the $params->get('username').
/Fredrik
Hi Fredrick, I know this code should work, but I still have no idea where it should go.
Remember that my form is a multi-page containing 3 pages before it is submitted. Email confirmation is also sent out (but it doesn't have to if this works).
I have tried it in the master form, tried it in the last step form before and after email etc but it just doesn't seem to work.
On the last step of my multipage, the user becomes registered using CF_CB Plugin, so I figured it should go into this form after submit, but sadly nothing works.
Any other ideas?
Hi Bob
I'm not one of those people who can't read. I have tried this and IT DOESN'T WORK.
I have tried with debug on and debug off (in my master form). I have tried with a "redirect URL" in the master form and with it off. I have tried it in many different places in other parts of my child forms.
So by PLUGIN you and Fredrick are taling about the CF_CB_Plugin right? This plugin applies to the last step of my multi page form (step 3) and then after that the master form emails out confirmation emails because that is where the Chronoforms docs say to put the confirmation emails.
Now, I'll start again.... Putting it in the CF_CB_Plugin in extra after submit doesn't work. I'm wondering if there is anything else obvious that someone wants to tell me?
Hi daemonhunt,
Sorry about that. I'm just quoting Fredrik, I don't know much about CB at all.
I thought someone posted recently (the last few days) about having an multi-form work OK with CB Registration though.
Bob
Hi Fredrick
You were outhunting? Wow, what do you hunt and where? This is the last place I thought a hunter would come to keep warm lol.
Anyway, thank you, I tried this code out in my last form step within the after onsubmit box in the CF_CB Plugin and unfortunately still no go. It pauses for a while longer than usual, that's about all, but no error codes or anything.
I'll try a few more combinations and tell you how I go.
Thanks