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

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -