I have a config.xml with some parameters for my component.

I need to define these parameters for each individual item.

So in admin/models/forms/myview.xml, I've written my fields:

<fields name="params">
    <fieldset name="params" label="JGLOBAL_FIELDSET_DISPLAY_OPTIONS">

and in my admin/tables/myview.php, inside the "bind" function

if (isset($array['params']) && is_array($array['params']))
    // Convert the params field to a string.
    $parameter = new JRegistry;
    $array['params'] = (string)$parameter;

The form is able to save data "params" in the database, but doesn't retrieve any params if saved.

  • It's unclear how you're retrieving data from database.
    – Sharky
    May 11 at 5:13
  • This is the question ... the data is saved in the dbase but the relative fields of the form are not populated May 11 at 7:10

1 Answer 1


To resolve the behaviour, I've deleted this function:

public function getItem($pk = null)
    if ($item = parent::getItem($pk))
        if (isset($item->params))
            $item->params = json_encode($item->params);
    return $item;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.