Hello,
I'm new to Joomla and ChronoForms, so please bear with me. I reviewed and copied the tutorial on creating a Registration Form. The form I want to create has a few more fields than the one that comes with Joomla (i.e. membership type - this is for a scholastic organization that requires yearly fees).
I assumed that the Registration Plugin would take the place of the registration form that feeds the jos_user table. However, the tutorial doesn't explicitly say that the form is using the jos_user table. Am I supposed to link it to a new table whose fields then match the form itself? It seems that's the only way it will work unless the plugin adds columns to the jos_user table.
I did a quick test and it doesn't add the record to that table so I'm assuming I need to create one. If that's the case, then, how does the new table grant permissions (e.g. Author, Editor, Publisher, etc?) and then use it INSTEAD of the jos_user table the next time you log in?
Thanks in advance for your help, and BTW, I really like both the Chronoforms and Chronoconnectivity components! Keep up the good work!
Cheers,
Mark
I'm new to Joomla and ChronoForms, so please bear with me. I reviewed and copied the tutorial on creating a Registration Form. The form I want to create has a few more fields than the one that comes with Joomla (i.e. membership type - this is for a scholastic organization that requires yearly fees).
I assumed that the Registration Plugin would take the place of the registration form that feeds the jos_user table. However, the tutorial doesn't explicitly say that the form is using the jos_user table. Am I supposed to link it to a new table whose fields then match the form itself? It seems that's the only way it will work unless the plugin adds columns to the jos_user table.
I did a quick test and it doesn't add the record to that table so I'm assuming I need to create one. If that's the case, then, how does the new table grant permissions (e.g. Author, Editor, Publisher, etc?) and then use it INSTEAD of the jos_user table the next time you log in?
Thanks in advance for your help, and BTW, I really like both the Chronoforms and Chronoconnectivity components! Keep up the good work!
Cheers,
Mark
Hi Mark,
The plugin will use the jos_users for the main data linke name,username..etc but for any extra data you need to connect to your extra table!
the 2 records will be tied using the cf_user_id field! you may then use this to publish any data for your user!
Regards
Max
The plugin will use the jos_users for the main data linke name,username..etc but for any extra data you need to connect to your extra table!
the 2 records will be tied using the cf_user_id field! you may then use this to publish any data for your user!
Regards
Max
I seem to be missing a step somewhere. The tutorial I downloaded tells me to tick the form I created and then the Joomla Registration link, which takes me to the form where I fill out the names of certain form fields. A couple of things where I didn't follow the tutorial closely may be part of the problem. The form I created has a firstname and lastname field instead of just a name field. So, in the name field on the plugin general tab I just used firstname (which is the name of the form field).
As you stated in your reply, the cf_user_id field is linked to the jos_user table (I assume it's the id field since that's the primary key and is auto incremented). However, the cf_user_id field is text and the id field on the jos_user table is int(11) so I'm not sure they can be linked since they're of different data types in the database.
I'm including the table field in both tables to illustrate, but I'm unclear as to which fields are written to via the plugin, and if so, do the field names and field types need to be the same? I tried adding a couple of dummy users using my chronoform form, and while it updates the table I created, it doesn't update the jos_users table...
jos_users
id int(11) auto_increment
name varchar(255)
username varchar(150)
email varchar(100)
password varchar(100)
usertype varchar(25)
block tinyint(4)
sendEmail tinyint(4)
gid tinyint(3)
registerDate datetime
lastvisitDate datetime
activation varchar(100)
params text
My table created with chronoforms
jos_chronoforms_register_renew
cf_id int(11) auto_increment
uid varchar(255)
recordtime text
ipaddress text
cf_user_id text
firstname varchar(255)
lastname varchar(255)
username varchar(255)
password varchar(255)
confirmpassword varchar(255)
school_org varchar(255)
memtype varchar(255)
As you stated in your reply, the cf_user_id field is linked to the jos_user table (I assume it's the id field since that's the primary key and is auto incremented). However, the cf_user_id field is text and the id field on the jos_user table is int(11) so I'm not sure they can be linked since they're of different data types in the database.
I'm including the table field in both tables to illustrate, but I'm unclear as to which fields are written to via the plugin, and if so, do the field names and field types need to be the same? I tried adding a couple of dummy users using my chronoform form, and while it updates the table I created, it doesn't update the jos_users table...
jos_users
id int(11) auto_increment
name varchar(255)
username varchar(150)
email varchar(100)
password varchar(100)
usertype varchar(25)
block tinyint(4)
sendEmail tinyint(4)
gid tinyint(3)
registerDate datetime
lastvisitDate datetime
activation varchar(100)
params text
My table created with chronoforms
jos_chronoforms_register_renew
cf_id int(11) auto_increment
uid varchar(255)
recordtime text
ipaddress text
cf_user_id text
firstname varchar(255)
lastname varchar(255)
username varchar(255)
password varchar(255)
confirmpassword varchar(255)
school_org varchar(255)
memtype varchar(255)
Hi MarkHoff,
The Joomla User table only has a single name field, you can use one of your fiels or create a new one by concatenating the values.
The cf_user_id and the Joomla user id are both integers. You can happily store an integer in a text field though it's not ideal practice.
The Plugin creates a map between the Joomla User table fields and your form fields. The field names can be the same or different - the map link the two. The data types need to be consistent - so you can't store text in an integer field but MySQL id pretty tolerant.
Bob
The Joomla User table only has a single name field, you can use one of your fiels or create a new one by concatenating the values.
The cf_user_id and the Joomla user id are both integers. You can happily store an integer in a text field though it's not ideal practice.
The Plugin creates a map between the Joomla User table fields and your form fields. The field names can be the same or different - the map link the two. The data types need to be consistent - so you can't store text in an integer field but MySQL id pretty tolerant.
Bob
Hi Mark,
If the user is not getting added then there is some problem with the registration Or you didn't enable something, you can add this code to the form onSubmit after email box to let you know if some error occured with teh registration:
it should reshow the form with the error and disable adding the user details to the chronoforms table!
Cheers
Max
If the user is not getting added then there is some problem with the registration Or you didn't enable something, you can add this code to the form onSubmit after email box to let you know if some error occured with teh registration:
<?php
$MyPlugins =& CFPlugins::getInstance($MyForm->formrow->id);
if($MyPlugins->cf_joomla_registration['errors']){
$MyForm->addErrorMsg($MyPlugins->cf_joomla_registration['errors']);
}
$MyForm->haltFunction["autogenerated_after_email"] = true;
?>
it should reshow the form with the error and disable adding the user details to the chronoforms table!
Cheers
Max
This topic is locked and no more replies can be posted.