I'm building a subscription form with Joomla Registration enabled. I would like the usertype to be set depending on the the selection from a drop down menu. Ex: I have four usertypes, in the form if the user selects option "A", then I want the usertype to be "A".
In the parameter settings for the Joomla User Registration action, I see where I can multi-select a usertype but I don't see an option to set by selection.
Is there a way to configure or code this?
I'm using ChronoForms V4, Joomla 2.5, form is here (under development): http://www.realtimesmedia.com/eedition/index.php?option=com_chronoforms&chronoform=Subscribe
In the parameter settings for the Joomla User Registration action, I see where I can multi-select a usertype but I don't see an option to set by selection.
Is there a way to configure or code this?
I'm using ChronoForms V4, Joomla 2.5, form is here (under development): http://www.realtimesmedia.com/eedition/index.php?option=com_chronoforms&chronoform=Subscribe
Hi elove,
You will need to alter the action's settings dynamically, please check this FAQ:
http://www.chronoengine.com/faqs/2630-how-can-i-upload-files-under-some-users-folder.html
The setting name to change is "new_usertype"
Regards,
Max
You will need to alter the action's settings dynamically, please check this FAQ:
http://www.chronoengine.com/faqs/2630-how-can-i-upload-files-under-some-users-folder.html
The setting name to change is "new_usertype"
Regards,
Max
Hi I couldn't follow the example in the link you provided, but I found another link that is better suited to what I'm trying to accomplish. Here is the link:
http://www.chronoengine.com/faqs/61-cfv4/cfv4-tutorials/4618-how-can-i-add-a-user-to-a-user-group.html
Here is what I have written which seems closer to what I'm trying to accomplish but it still does not work... I'm not sure if I'm putting the action in the wrong place? But it's after the Joomla Registration Action
Location is the name of the variable the user selects to determine the user type. If the user is subscribing to the the Michigan location, his user group becomes Michigan - were he can only access Michigan features etc...
Thanks!
http://www.chronoengine.com/faqs/61-cfv4/cfv4-tutorials/4618-how-can-i-add-a-user-to-a-user-group.html
Here is what I have written which seems closer to what I'm trying to accomplish but it still does not work... I'm not sure if I'm putting the action in the wrong place? But it's after the Joomla Registration Action
<?php
if ( !isset($form->data['location']) || !$form->data['location'] ) {
// there is no location selected
return false;
}
$group_id = $form->data['location'];
$user_id = $form->data['_PLUGINS_']['joomla_registration']['id'];
jimport( 'joomla.user.helper' );
JUserHelper::addUserToGroup($user_id, $group_id);
?>
Location is the name of the variable the user selects to determine the user type. If the user is subscribing to the the Michigan location, his user group becomes Michigan - were he can only access Michigan features etc...
Thanks!
Also, I have set the location variables to equal the group id as stated in the directions. I noticed that it sets the user group by the pre-selected usertype parameter in the Wizard (see attachment)
I need to do the same thing: user select their usertype when they register on the website. Did you figure out how to do so?
Any help will be much appreciated.
Any help will be much appreciated.
This topic is locked and no more replies can be posted.