List Manager Forum

User Name for the Records and Custom Fields

User moon_826 2012-12-06 13:51:54

Where does User Name for a particular record created in the component stored? I am developing a form and wanted to access the TABLES to get the records associated for a user? How to do this?

Also, i wanted 2 custom fields which i know i can create and NOT exhibit in the form. But these custom fields should be populated by my logic which will be stored in my SESSION variable. How do i do this?

Thanks for your quick response and support.

Raj

Moonsoft support 2012-12-06 14:18:41

Hello,
in order to store user data attached to each record, you must add a field typed 'user' to your list. This field will be filled automatically with every save with the user ID, and you'll see the user name at backend (and front-end, if marked as visible). But we don't store the user name, that value is recovered joining listmanager db table

xxx_listmanager_values

with the joomla user table

xxx_users

when showing the information.

About custom fields, if you want to fill on your own some columns you will need some coding skills. We suggest to create a couple of text fields, and mark them as not visible for the user, but configuring some default values for them, like 'custom1' or 'custom2'. Then, at the model code, you could check if some field contains the value 'custom1', to replace it for the logic needed.


If you check the file
joomla\components\com_listmanager\models\listmanager.php

about line 235 you'll see:

$tmp_value=JRequest::getVar......

here you can change the default values for your own:
if($tmp_value=='mycustom1'){
$tmp_value="Coded value";
}

Hope this helps

...
Support/development

Perfect for small code changes or to correct any bug at your site

Buy now!
...
CalcBuilder

Create dynamic calculators

Buy now!