I have a Joomla installation with a plugin which adds custom fields to the attribs object. I'm using that in full effect in my templates, etc. So far working great.
Now I have to add these fields to the template edit form on the frontend. But the following code (which is working in another Joomla installation) doesn't work:
Code: Select all
<?php if ($this->item->id) : ?>
<?php $attribss = json_decode($this->item->attribs); ?>
<? //print_r($attribss); ?>
<?php $this->form->setValue('ank_datum', 'attribs', $attribss->ank_datum); ?>
<?php $this->form->setValue('ank_soort', 'attribs', $attribss->ank_soort); ?>
<?php $this->form->setValue('ank_leesmeer', 'attribs', $attribss->ank_leesmeer); ?>
<?php $this->form->setValue('ank_prijs', 'attribs', $attribss->ank_prijs); ?>
<?php $this->form->setValue('ank_tijd', 'attribs', $attribss->ank_tijd); ?>
<?php $this->form->setValue('ank_locatie', 'attribs', $attribss->ank_locatie); ?>
<?php endif; ?>
<?php echo $this->form->renderField('ank_datum', 'attribs'); ?>
<?php echo $this->form->renderField('ank_soort', 'attribs'); ?>
<?php echo $this->form->renderField('ank_leesmeer', 'attribs'); ?>
<?php echo $this->form->renderField('ank_prijs', 'attribs'); ?>
<?php echo $this->form->renderField('ank_tijd', 'attribs'); ?>
<?php echo $this->form->renderField('ank_locatie', 'attribs'); ?>