We are in the process of upgrading joomla 1.5 to 2.5. We use Chronoform version 1.3/ V3.1 RC5.2 (May 2009)for our membership application- member profile update(first name, last name, email address, phone number...etc). The application was developed by the person who is no longer with the organization. We took over and try to move forward and to upgrade to Joomla 2.5 and Chronoforms v4.
The following is the process that we use/have in joomla 1.5: We have members master table, eu_members, the primary key(member_id) of eu_members is identical to jos_users table(ID). For example, Jean's jos_users' 'id' is 2416. In the eu_members table, the 'member_id' for jean is 2416 as well. The ChronoForm displays member information after login, using Profile Plugin.
We have problems accomplish the same task using Chronoform V4. Which has totally different structure, Profile plugin can not be used here?
I found a document that is relevant to what we try to achieve, however, we are having trouble passing a dynamic variable. We are using a PHP routine within the ChronoForm we are looking to replace, (Partial script below:)
function getMemId()
{
$memberId = $_POST["member_id"];
$memId = $_GET["cids"];
if ( $memberId == "" )
. . . . . }
in our scripts. This works for us. However, as we prepare to update, we are having trouble with ability to use $_GET["cids"];
Below is the document we have read:
http://www.chronoengine.com/faqs/2674-how-can-i-edit-a-record-from-a-database-table.html
Lookup using the User ID
To use the current User ID put user_id in this box; save the DB Record Loader; then drag a Custom Code action into the same event and move it up before the DB Record Loader; open the Custom Code action and add this code:
<?php
$user =& JFactory::getUser();
$form->data['user_id'] = $user->id;
?>
We are finding we need to hard code the member_id value in the WHERE statement for it to work. This is not something we want for it is desirable for the individuals to update most of the their own data within the database.
Do you have any ideas how we may solve this?
Thanks for the help in advance.
The following is the process that we use/have in joomla 1.5: We have members master table, eu_members, the primary key(member_id) of eu_members is identical to jos_users table(ID). For example, Jean's jos_users' 'id' is 2416. In the eu_members table, the 'member_id' for jean is 2416 as well. The ChronoForm displays member information after login, using Profile Plugin.
We have problems accomplish the same task using Chronoform V4. Which has totally different structure, Profile plugin can not be used here?
I found a document that is relevant to what we try to achieve, however, we are having trouble passing a dynamic variable. We are using a PHP routine within the ChronoForm we are looking to replace, (Partial script below:)
function getMemId()
{
$memberId = $_POST["member_id"];
$memId = $_GET["cids"];
if ( $memberId == "" )
. . . . . }
in our scripts. This works for us. However, as we prepare to update, we are having trouble with ability to use $_GET["cids"];
Below is the document we have read:
http://www.chronoengine.com/faqs/2674-how-can-i-edit-a-record-from-a-database-table.html
Lookup using the User ID
To use the current User ID put user_id in this box; save the DB Record Loader; then drag a Custom Code action into the same event and move it up before the DB Record Loader; open the Custom Code action and add this code:
<?php
$user =& JFactory::getUser();
$form->data['user_id'] = $user->id;
?>
We are finding we need to hard code the member_id value in the WHERE statement for it to work. This is not something we want for it is desirable for the individuals to update most of the their own data within the database.
Do you have any ideas how we may solve this?
Thanks for the help in advance.
Hi Rlaurel,
What you have describe looks correct. The user_id should have a value provided that the current user is logged in.
If you drag a debugger action into the On Load event you will be able to see the variables that are set and this will help you know exactly what is happening.
Also the order of the actions is important, the Custom Code action must be before the DB Record Loader.
Bob
What you have describe looks correct. The user_id should have a value provided that the current user is logged in.
If you drag a debugger action into the On Load event you will be able to see the variables that are set and this will help you know exactly what is happening.
Also the order of the actions is important, the Custom Code action must be before the DB Record Loader.
Bob
We are still perplexed. Our debugger shows the correct value for the "user_id" for the member who is logged on for the session when the script is being run. But we are still not obtaining information for the member record from the database.
I will query the developer about an error message or a "no result" behavior from the Chronoform script.
I will query the developer about an error message or a "no result" behavior from the Chronoform script.
We are getting no result. The just blank spaces where normally we would expect the Chronoform to populate with data currently found in the database.
The idea here was to allow the member to inspect their own profile information, (first name, last name, address, email, telephone number, etc.), & edit it for themselves if something were wrong or changed.
Any ideas?
The idea here was to allow the member to inspect their own profile information, (first name, last name, address, email, telephone number, etc.), & edit it for themselves if something were wrong or changed.
Any ideas?
This topic is locked and no more replies can be posted.