Show usercontent in form via menulink (not token in url)

Rolfo 10 Oct, 2011
Hi, (v4+J1.7.1)

My form works well when using the token in the URL. (also updates via hidden primary key field etc.) But now I want to make the form available via a menulink for registered users, with their info already loaded in the fields.

I tried several things in the record loaders (delete Request Param 'token' and added php in the Where statements) and added Redirect URL/User, but I cannot get it to work without passing the userid token in de URL...

What is the proper way for routing this?

Thanks in advance, rolf
GreyHead 11 Oct, 2011
Hi Rolf,

I think (not tested) that if you add a Custom Code action before the DB Record Loader and put in it
<?php
$user =& JFactory::getUser();
$form->data['user_id'] = $user->id;
?>
Then you should be able to use user_id as the token.

Bob
Rolfo 11 Oct, 2011
Thanks GreyHead, it works perfectly fine when using the fieldname in the request parameter of the DB Record Loader. Thanks
This topic is locked and no more replies can be posted.