brianpat VIP
Total posts: 211
05 Март 2014 20:56

Hi,

is it possible to have the value of a text area field be filled automatically by sql, means the value will be filled from a table and column. here is what i think will be very helpful.

go to text area field in the default value, there will be option to choose table and column then on from end based on choosen table and column, the default value for text area will be autofilled

my second question is if it is possible to retrieve values from Easy social profile field?

Последние изменения: 06 Март 2014


Sergey
Total posts: 13,748
06 Март 2014 05:51

If you create this on the level of input template then you can retrive from any table in DB. You do not even need parameters, because in template you already know for what type you add this and just query what you need.

You have to check $this->value. If it is empty, then you retrive something. If not, we are editing record and have to use what was saved before.

I understood what you need.

All you need to do in your sustom template is add

if(empty($this->value))
{
    $db = JFactory::getDBO();
    $db->setQuery("SELECT WHAT YOU NEED");
    $this->value = $db->loadResult();
}

after $mask = $this->params->get('params.mask', 0);.


brianpat VIP
Total posts: 211
06 Март 2014 17:52

thanks, i will try

Работает на Cobalt