YesNo field clickable in a listview

edthenet

New Member
Is it possible to make a YesNo field clickable in a listview so that i can change the value without opening the edit-form?
 
No. We are planning to implement something which would do this, but we don't have it yet.

Only alternative is to use the inline edit list plugin.

-- hugh
 
Hi Hugh,

Is it possible now ?.... can we do like in admin page 'published/unpublished' in list view without opening any form or popup but just single click.

Thanks.
 
No.
To simulate you can add a php plugin to toggle or two update_column plugins.
 
Or if you really, really want it. You can make a list clickable field by displaying it a calculation field with some JS event attached that would call the back-end to update the field. Please note that in the example below I am actually updating another table which only has the id and the update-able field published. Like this I did not have to pass all form fields back. As I saw Hugh suggesting in another post, you can do this probably less hacky by using the ajax_user framework.

PHP:
$myval="{ha_timers___active_raw}";
$myrow="{ha_timers___id}";

$booticons  = array( 0 => "icon-remove color-red",  1 => "icon-clock color-green") ;
if (array_key_exists($myval, $booticons)) {
  $myret = '<i class="condensed-icon '.$booticons[$myval];
  $myret.= '">';
  $myret.= '</i>';
}

$myurl='/index.php/ha/ha-setup/ha-setup-menu-commands/ha-setup-timers';
$myvalnot = ($myval == "1" ? "0" : "1");
$params = Array ( 'ha_timers___id'=>$myrow, 'ha_timers___active[0]'=>$myvalnot, 'listid' => 240,
                  'listref'=>240, 'rowid'=>$myrow, 'Itemid'=>451, 'option'=>'com_fabrik' ,
                  'task'=>'form.process', 'formid'=>228, 'returntoform'=>0, 'fabrik_ajax'=>1,
                  'package'=>'fabrik', 'format'=>'raw', 'Submit'=>'');


$result = '<p  style="cursor:pointer" onclick="jQuery.ajax(
    {
        url : &QUOT;'.$myurl.'&QUOT;,
        type: &QUOT;POST&QUOT;,
        data : '.htmlentities(json_encode($params)).',
        async : false
    });
    Fabrik.blocks.list_209_com_fabrik_209.doFilter();
    return false;
">'.$myret.'</p>';
return $result;


:) Oh the wonderful stuff Fabrik will let you do :)
Paul
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top