• 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.

Edit Row and Add new row

saovry

Keep Learning
I created one list and it contains many inform. And those information doesn't related with each other..
Screen Shot 2020-10-28 at 9.46.05 AM.png

1. Is it possible when I click edit the row so we can edit that row and save it in the page without open popup or new window?

2. Is it possible when I click Add and it adds another below row so we can add any information in there?

thank u
 
1. There is the "Inline Edit" list plugin: http://fabrikar.com/forums/index.php?wiki/inline-edit-list-plugin/
There have been few reports of it not working, but that may have been caused by certain Joomla templates or so. So, maybe give it a try and see if that's what you want.

2. Well... yeah, that's the one and only purpose of the "Add" button... so, that's definitely worth a try! :D
If a new record shows below the existing rows or somewhere else depends on the sort order you chose for your list.
 
You see in the Wiki article I linked to how it should work.
You also find hints there where and when it shouldn't be used, and that it is provided "as is" (so, no "guarantee" that it will work at all).
Best please read the Wiki again.
 
I have tested the plugin lately in couple of environments and it's either not working at all or have serious issues.

So I would say the short answer to your question is no, unless you want to rewrite the code yourself.
 
Ok, so while we're at it: I have it running perfectly fine since 1.5+ years under J! 3.9.4, Fabrik 3.9(.0?), PHP 7.2 -- and even a Yootheme Warp 7 template -- ha!
But since then not used or tested again.

Sure it's everyone's dream to have a Fabrik HTML table working like a spreadsheet app, hehe. I've been once trying to get at least the yes/no icon to "change on click" (and of course change value in the DB), but I stink with Ajax. (Sooo, if anyone's got the code for that, I'll send a ton of love back!) :cool:
 
I have tested the plugin lately in couple of environments and it's either not working at all or have serious issues.

So I would say the short answer to your question is no, unless you want to rewrite the code yourself.

did you get rewrite the code or not?

I don't code so I can't rewrite it..

do you have any way to achieve what you get or not?
 
Ok, so while we're at it: I have it running perfectly fine since 1.5+ years under J! 3.9.4, Fabrik 3.9(.0?), PHP 7.2 -- and even a Yootheme Warp 7 template -- ha!
But since then not used or tested again.

Sure it's everyone's dream to have a Fabrik HTML table working like a spreadsheet app, hehe. I've been once trying to get at least the yes/no icon to "change on click" (and of course change value in the DB), but I stink with Ajax. (Sooo, if anyone's got the code for that, I'll send a ton of love back!) :cool:

thank u for your promise.. I hope someone can fix it and gave the code..
thank u..
 
I haven't diged into inline plugin code as it's not by far trivial to get it reliably working.

I solved my case with a custom code where I needed to be able to change the state of yesno element by clicking on it in list view.

With this example, the id element should be in the first column of the list. First I added a custom class "myvalid" to my yesno element. Then in list_X.js I had:

Code:
jQuery("body").delegate(".myvalid > i", "click", function () {
 
    mythis = jQuery(this);
 
    mytr = jQuery(this).parents("tr");
    myrowid = mytr.find("td").eq(0).html();
    myrowid = jQuery.trim(myrowid);
 
    mystatus = jQuery(this).attr("class");
    mystatus = jQuery.trim(mystatus);
 
    jQuery.ajax({
             url: "https://www.domain.com/myscript.php",
            type: "POST",
            data: {row_id: myrowid, row_status: mystatus},
         
            success: function(data) {
         
            if(mystatus === "icon-remove") {
                mythis.removeClass('icon-remove');
                mythis.addClass('icon-checkmark');
            } else {
                mythis.removeClass('icon-checkmark');
                mythis.addClass('icon-remove');             
            }

        }
    });

});

And the myscript.php:

Code:
<?php
define( '_JEXEC', 1 );
define( '_VALID_MOS', 1 );
define('JPATH_BASE', '../');
require_once ( JPATH_BASE .'/includes/defines.php' );
require_once ( JPATH_BASE .'/includes/framework.php' );

$mainframe =& JFactory::getApplication('site');
$mainframe->initialise();
$user = JFactory::getUser();
$session =& JFactory::getSession();
$config = JFactory::getConfig();

$row_id = $_POST['row_id'];
$mystatus = $_POST['row_status'];

$mydb =& JFactory::getDBO();
if ($mystatus == "icon-checkmark") {
$query = "UPDATE mytable SET active = '0' WHERE id = ".$mydb->Quote($row_id);
} else {
$query = "UPDATE mytable SET active = '1' WHERE id = ".$mydb->Quote($row_id);
}
 
$mydb->setQuery($query);
$mydb->execute();

Would probably be easier if there would be a rowid attached to the yesno element, but that requires editing the core code.
 
Last edited:
The rowid is in the tr id="list_116_com_fabrik_116_row_54" (so independent of the element order or of id element with/without link to details).
 
Yep, the rowid could probably be fetch also from the id by getting the string after the last "_".

The rowid is in the tr id="list_116_com_fabrik_116_row_54" (so independent of the element order or of id element with/without link to details).
 
Lucky you :). Seems it works with some setups/conditions/elements types. It's a real pity that the plugin is depreciated. This kind of inline editing is really convenient in many cases and is included in most of the frameworks widely in use nowadays. So for me it's a quite big step backwards :(

Ok, so while we're at it: I have it running perfectly fine since 1.5+ years under J! 3.9.4, Fabrik 3.9(.0?), PHP 7.2 -- and even a Yootheme Warp 7 template -- ha!
But since then not used or tested again.
 
I never used it.
I think the problem is that there are so many possibilities in Fabrik which may conflict with "just changing a bit content" in list view (repeat groups, validations, form plugins, complex elements, elements depending on others, joined data ...)
 
I solved my case with a custom code where I needed to be able to change the state of yesno element by clicking on it in list view.
Ooooohhhh man... thank you sooo much!!!
I've got to try that in the very near future! Will keep you posted... you know... the love... :p
 
As for the inline edit plugin I have in good use: yeah, admittedly it is very simple. It's a copy of a pretty complex list, but with only just over a handful of elements displayed, and the 4 inline-editable elements are simple integer fields...
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top