Buy Now
Sign in

Joomla User Registration form with custom fields

M.Abletech , April 04 at 09:47
Answered
M
M.Abletech
Hi,
I wish I can add also custom fields ( as Company ) in Chronoform ( v5 or v6) to Joomla user registration.
Any tips?
Miriam
healyhatman
In your joomla menu, go Users->Fields and add the fields you want. Take note of the id of the field, on the right.
It's stored in [prefix]_fields_values.
field_id: the id number I told you to look for
item_id: the user's id
value: the value you want to save.
In your chronoforms submit event, AFTER you have saved the user, you need a save data action - database table [prefix]_fields_values, data override on Insert field_id:id_you_want
item_id:{user:id}
value:{data:fieldyouwant}
And do it in CF6
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
M
M.Abletech
Thanks!
I've done as you said: only on issue.
item_id:{user:id} is not getting any value.
http://prntscr.com/j0q62t
I'm probably missing something... How can I pass it ?
I've put the SAVE DATA action after SAVE USER action
http://prntscr.com/j0q9hd
Thank you @healyhatman !
healyhatman
Maybe Save User, then Log In user, THEN save data?
OR: {var:joomla_user2.id} replacing "joomla_user2" with the name in the black label of your save user action? (looking at your screenshot, should just be joomla_user2). Put a debug after Save User and see if there's a user id in the data.
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
M
M.Abletech
GREAT healyhatman!!!!!!
I've used {var:joomla_user2.id} because users are not unable by default but they need admin validation, so no login is possible.
Thank you so much, you helped a lot!
M
mediandmore
Hi there,
I have the same problem.
Can't figure out how to put the custom fields in the Data Override -> Save User Action.
And, the activation link/user, how to add on the email the activation link?
Thanks and best regards