SOLVED: I had simply missed out a line of code in tmpl/edit/php.....
defined( '_JEXEC' ) or die;
$options2 = JCckDev::fromJSON( $this->item->options2 ); <- this was missing....
This was driving me nuts!!!!
------------------------------------------------
Hi folks
Hoping someone can suggest where I am going wrong...
- I have created a custom field (type: cck field)
- I can create an instance of it
- It stores data in db.
- When I edit the field the data is not retrieved...
EXAMPLE
echo JCckDev::renderForm( 'core_dev_text', @$options2['content_type'], $config, array( 'label'=>'CONTENT_TYPE', 'storage_field'=>'json[options2][content_type]' ), array(), 'database content-type' );
- I create an instance of the field in my content type form.
- I save the data.
- It stores in #__cck_core_fields i.e.
"content_type":"#__cck_store_free_map"....
- But when I reopen the field, there is no data shown.
Any ideas??
Thanks in advance
Jon