• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

How to update current list/table using list php (but java) plugin?

Hi,

I have nice js code that works for element ___ip_konfig3 --- javascript-action:load
Now, i use edit record from list1 - and js works - show/display proper values for fields:
pp BCD --- ___pp_bcd
ppp BD --- ___pp_pb
ppp C --- ___pp_pc
when save record - then displayed by js code values are saved in table and are visible on list1.

What i need is to do the same for multiple records - by checking records on list and run php(java)-plugin for list.

My problem is how to modify my starting js code ( element---javascript ---action:load) when place this code to php(java) list plugin -- to store values in database table1 --- this table is table for current list. ?
I have read WIKI - list plugin - php - but this is not enought for me to code "UPDATE table1 SET `pp_bcd`='???1', `pp_pb`='???2', `pp_pc`='???3' WHERE `id`='selected/checked on list1 records'


JavaScript:
var bcd = Fabrik.getBlock('form_320').formElements.get('ccjom_cc_kk_karta_rejestr___ip_konfig3').getValue();
var jest = 1;
var niema = 0;
$('ccjom_cc_kk_karta_rejestr___pp_bcd').value = bcd; 

if(bcd.contains('PB')==true){
var ppb = 1; 
}

else
{
var ppb = 0;
}


if(bcd.contains('PD')==true){
var ppd = 1; 
}

else
{
var ppd = 0;
}


var ppbd = ppb + ppd;
$('ccjom_cc_kk_karta_rejestr___pp_pb').value = Number(ppbd);

if(bcd.contains('PC')==true){
var ppc = 1; 
}

else
{
var ppc = 0;
}


$('ccjom_cc_kk_karta_rejestr___pp_pc').value = Number(ppc);
 

Attachments

  • Zaznaczenie_058.png
    Zaznaczenie_058.png
    39.9 KB · Views: 518
  • Zaznaczenie_057.png
    Zaznaczenie_057.png
    38.5 KB · Views: 459
Last edited:
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top