Forum


List Manager Support

List Manager support
Forums
Public write access is disabled. Please login

User Field 11.06.2012 10:45

I added the user field to track which user has added a record, however, when a record is added the user field in the view is blank (has no value).

If I choose a user in the backend, it will show up in the view, however when admin add comment or the user update the record the "User" file is blank in the view.

Could you please advise how to fix this.

Edited by moon_541 - 11.06.2012 10:50

Re: User Field 11.06.2012 12:10

Hello,
that seems as the id of active user is not being recovered when storing records. Please try this alternative method:

edit file
joomla\components\com_listmanager\models\listmanager.php

and around line 335

replace this line


if ($field['type']=='6') tmp_value=JUser::getInstance()->id;

with this one

if ($field['type']=='6') $tmp_value=JRequest::getVar('user_on');

try to add a new record and please confirm if now you can see the user name at the record.

Regards
Moonsoft Team
www.moonsoft.es

Re: User Field 11.06.2012 12:47

Dear Support,

I had this same problem and applied your suggestion and it now works

Thanks

Anselm

Re: User Field 11.06.2012 13:34

Thanks, now it works.
However, I would like to know if it is possible to retain the original userid of the person who created the row.

I have setup so the admin can update the progress of each request in the each row, however when the admins update the progress, it changes the user to the Admin ID instead of retaining the ID of the user who created the row.

Thanks.

Re: User Field 11.06.2012 14:13

Hello,
when using front-end edition, user always updates to the one saving the row. If you want to preserve initial user, you should use backend administration to update the records without changing that field.

Regards
Moonsoft Team
www.moonsoft.es

Re: User Field 11.06.2012 15:28

I have worked out if I comment out the //if ($field['type']=='6') $tmp_value=JRequest::getVar('user_on');

and save it will not update the user.

What I need to is to have a new button on the form called "Update" and this will post the result into the table with the function below:

Is this possible?

function updateData(){

//if ($field['type']=='6') $tmp_value=JUser::getInstance()->id;
//if ($field['type']=='6') $tmp_value=JRequest::getVar('user_on');


}

}

Edited by MSTeam - 11.06.2012 19:58

Re: User Field 11.06.2012 20:01

Hello,
yes, you could try to add a new function, if you want to give it a try. Also you can code something like this, instead of commenting the line:


if ($field['type']=='6' && JRequest::getVar('idrecord',"")=="") $tmp_value=JRequest::getVar('user_on');

(Only assign value to new records)

Hope this helps
Moonsoft Team
www.moonsoft.es
Are you satisfied with our products/services/support?
Please help us to keep improving, add a review at  joomla extensions site and  magento connect
FaLang translation system by Faboba

Our clients' feedback