joomla3.0 - Joomla custom fields plugin wont save inputted data when attempting to only show it on certain categories within the article manager -
i putting simple plugin joomla show custom fields within article editor. works until try , configure show on categories. once tell custom fields show on category fields show fine buy wont save @ all.
here's function stands:
function oncontentprepareform($form, $data) { $app = jfactory::getapplication(); $option = $app->input->get('option'); switch($option) { case 'com_content': if ($app->isadmin()) { jform::addformpath(__dir__ . '/forms'); if ( $data->catid == '9' ) { $form->loadfile('this', false); } } return true; } return true; }
so adding 'if ( $data->catid == '9' )' job , see fields on catid 9 when add clause no longer saves.
here's form xml looks like:
<form> <fields name="params"> <fieldset name="this"> <field name="note01" type="note" label="this" /> <field name="row_1_toggle" type="radio" class="btn-group btn-group-yesno" default="no" label="show row 1" > <option value="yes">yes</option> <option value="no">no</option> </field> </fieldset> </fields>
Comments
Post a Comment