Quick question - I've got a chronoform linked up to the CB registration plugin (CB 1.1) and currently have the username value going into the CB name field - is it possible to put the user's first and last names into the CB name field instead? Because that's what I have them filling out on the registration form. It would be cool if those could show up in the CB backend user management main list.
Forums
First name & last name in CB registration "name" field
Hi Chris,
assuming the Name field of CB is "name" then add anything in the CB plugin config page for this field then add this code in the onsubmit box and make sure the order is to run this code before the pluging:
assuming your first and last names fields are with the above names!
regards
Max
assuming the Name field of CB is "name" then add anything in the CB plugin config page for this field then add this code in the onsubmit box and make sure the order is to run this code before the pluging:
JRequest::setVar('name', JRequest::getVar('firstname').' '.JRequest::getVar('lastname'));
assuming your first and last names fields are with the above names!
regards
Max
Dang that was a fast reply!
Thanks - I'll try this out!
Thanks - I'll try this out!
Just got around to trying this. Doesn't work.
I think I set it up right... I have a form... it has firstname and lastname fields... email and password and verify password fields... a couple of other fields... connected to the CB registration plugin... the form was working fine before I tried your suggestion... after I tried it, no data. Users aren't getting written into the database.
I think I followed your instructions correctly - I changed the "name field" in the CB plugin from "username" (which was working) to "name". Then I pasted your code into the "On Submit code - before sending email" area in the form code section of the form. Then I clicked on the RunOrder tab and changed it to run the OnSubmit block first, then plugins. Saved it.
Didn't work.
Then I tried removing the code from the form code tab pasting it into the "Extra before onsubmit code" area on the CB plugin configuration page. Didn't work.
Any suggestions?
Joomla 1.5.7, CB 1.1, latest ChronoForms.
I think I set it up right... I have a form... it has firstname and lastname fields... email and password and verify password fields... a couple of other fields... connected to the CB registration plugin... the form was working fine before I tried your suggestion... after I tried it, no data. Users aren't getting written into the database.
I think I followed your instructions correctly - I changed the "name field" in the CB plugin from "username" (which was working) to "name". Then I pasted your code into the "On Submit code - before sending email" area in the form code section of the form. Then I clicked on the RunOrder tab and changed it to run the OnSubmit block first, then plugins. Saved it.
Didn't work.
Then I tried removing the code from the form code tab pasting it into the "Extra before onsubmit code" area on the CB plugin configuration page. Didn't work.
Any suggestions?
Joomla 1.5.7, CB 1.1, latest ChronoForms.
Hi chriscaple,
I'm not sure about changing 'username' to 'name' - usually they are two different fields.
Did you add <?php ?> tags round Max's code?
Bob
I'm not sure about changing 'username' to 'name' - usually they are two different fields.
Did you add <?php ?> tags round Max's code?
Bob
I did when I tried it in the form section... but not when I tried it on the CB plugin configuration page...
try it in the "onsubmit after email" as you already changed the order!
Regards
Max
Regards
Max
This topic is locked and no more replies can be posted.