Hello,
I've followed the CV4 DB Record Loader tutorial to build a customer profile page. It works when I manually add in "&token=" and the cf_uid of my fake customer's profile record.
However, when I log in using a fake customer login/password and select the link to the customer profile page (the record was saved to the db previously by the fake customer), it doesn't automatically load the "&token=" and the cf_uid of that particular customer. The form/page comes up but the fields are not populating with the record.
Any guidance is appreciated!
I've followed the CV4 DB Record Loader tutorial to build a customer profile page. It works when I manually add in "&token=" and the cf_uid of my fake customer's profile record.
However, when I log in using a fake customer login/password and select the link to the customer profile page (the record was saved to the db previously by the fake customer), it doesn't automatically load the "&token=" and the cf_uid of that particular customer. The form/page comes up but the fields are not populating with the record.
Any guidance is appreciated!
Hi,
In order to load a record based on logged in user's data you will need to use this in the WHERE box:
assuming the table column storing the user's id is cf_user_id (this is ok if you created the table using Chronoforms)
Regards,
Max
In order to load a record based on logged in user's data you will need to use this in the WHERE box:
<?php
$user = JFactory::getUser();
?>
cf_user_id='<?php echo $user->id; ?>'
assuming the table column storing the user's id is cf_user_id (this is ok if you created the table using Chronoforms)
Regards,
Max
This topic is locked and no more replies can be posted.