Record Loading Question

Manofstyle 25 Jun, 2012
I followed the tutorial CFV4_db_record_loader.pdf

What I'm trying to do is the user must be logged in, then they're presented with a form. The fill the information and
anytime they're logged in the information that user entered is visible. I followed the directions to the letter and when I logout and log back in the information disappears.

I think this is due to the "token" url not being there. I'd don't want a token url being that there will be several different forms on the page, in addition to access the forms the user must be logged in so there's the validation.

I'd like everything attached to the "cf_user_id" I think just because then it's the same id as the joomla id. What should I do to make everything work as mentioned?
GreyHead 26 Jun, 2012
Hi Manofstyle ,

You still need to set a 'token' id - but this can be the user id. You need to make sure that is included in the $form->data array before the DB Multi-Record loader action.

Please see this FAQ about User info.

Bob
Manofstyle 26 Jun, 2012
Before you replied, I found the following code and tried it. It did work. Would you recommend your way? This is all out of my realm of experience so I apologize for my questions.

I put this code in the "WHERE" box of the DB Record Loader and it works!

<?php
$user = &JFactory::getUser();
echo "cf_user_id = ".$user->id
?>
GreyHead 26 Jun, 2012
Hi Manofstyle,

That's OK - you've just short-cut my way a bit.

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