Forums

Contact form filling?

gatsu 19 Oct, 2009
Is it possible to have a full form with name email address phone numbers all that stuff and then have specific fields sent through joomla to populate the fields in the contact page?

For example: A new prospective employee fills out our application. At the end of filling out the application a few fields we have preselected from the form automatically setup a joomla login (we already have that part figured out) and fills in their address, phone, fax and other info into their contact information?

This would really help us out as it would fill in a type of employee directory immediately after they register/apply to work with us.
GreyHead 19 Oct, 2009
Hi Gatsu,

Should be no problem, use the Joomla Registration Plugin for the registration bit then set up a DB Connection to the contacts table.

Bob
gatsu 19 Oct, 2009
I'm sorry but how do we do this? I'm pretty clueless as to how to get this started.
GreyHead 20 Oct, 2009
Hi Gatsu,

Please check the DB Connection tutorial from the Tutorials tab above. test with a couple of fields on a simple form.

Bob
gatsu 21 Oct, 2009
Perfect! that worked.

One last question. Is there a way to get the user_id that is going to be generated from the joomla! registration plugin?

Each user has their own unique ID how do we get that unique ID to insert into one of our database tables?
GreyHead 21 Oct, 2009
Hi Gatsu,

The UserID is available in the Joomla User Object once the Registration is complete. Provided that you have the work-flow sequence correct ChronoForms will add it to the table as cf_user_id. If you update the table before the registration then the cf_user_id will be '0' (the guest id).

Bob
gatsu 21 Oct, 2009
I see thank you, how do we have it so i adds it to the table as id instead of cf_user_id ?
GreyHead 21 Oct, 2009
Hi Gatsu,

Look up the id from the Joomla User Object and set a value in the Post array:
<?php
$user =& JFactory::getUser();
JRequest::setVar('id', $user->id);
?>

Bob
This topic is locked and no more replies can be posted.