Groups and subgroups in a form

mariluzrm

Member
Hello.
I have a list with two joins (two repeatable groups). By displaying it on the form I get figure A but I want to show figure B (that is, each neighbor within his building floor). (I need all that data to be in the same form).
Thanks.grupos y subgrupos.png
 
Like @lousyfool said, you can't.

But, I have done something that might be similar to your request with embeded lists. So basically you would need to embed a "Floors" list to "Building" form with Fabrik content plugin. And then you would need to have the "Neighbours" group as repeatable in "Floors" list. So you would add floors and neighbours from the embeded list in "Building" form.

And you need to set "Floors" list links to "ajaxify" to open the form in popup window.
 
Thanks!

But I suppose that I can make a link within the Floor to the Neighbors list of that Floor, right? And there I can edit the neighbors (modify, add, etc).

link to list.png

But then, in order to register neighbors, I need the Floor record to have already been saved in the database, right?. If so, how can I ask in the link if the Floor has already been saved in the database? So, if it hasn't been saved yet, you can't add the neighbors yet and a messagebox can be displayed (that is, the user is forced to save the Building + Floor form so that neighbors can be added and the building and Floor IDs already exist. I don't know if I'm explaining myself well (sorry for my english) ... Or I don't know if there would be another way to "simulate" repeatables groups within groups ...

Thanks.
 
Floors and repeat group Neigbours would have to be in a same list which you then embed to the "Building" form. And you have to join the "Building" table to "Floors" table something like building.id -> floors.building_id. If I remember correct, I added something like this in main (Building) form's outro with Sourcerer plugin:

Code:
$myrowid = $input->get('rowid');

if($myrowid != "") {
echo "{fabrik view=list id=XX floors-table___building_id=[rowid]}";
} else {
echo "Please fill in the building data and click on "Save" before adding Floors and Neigbours";
}
 
Thank you, something like that would help me.

I added something like this in main (Building) form's outro with Sourcerer plugin:
What is "Sourcerer plugin"? I've searched and it's not Fabrik's, right? What advantage does it have over Fabrik's PHP plugins (form plugin)? How does it work?

Thanks!!
 
Hi @troester is the Sourcerer plugin still working, i try your code and i get some error...
Yes, last time I checked (recently) it's still working, and why not.
If you're having trouble with Sourcerre, you must contact the developer = Regular Labs. If you do, don't forget to tell them exactly what error you're getting, otherwise it's nearly impossible for anyone to help anywhere.

Also, @troester's post here above did not contain any code, so not sure what you're referring to in this regard.
 
Sorry i just notice the code was for diferent user, i manage to make it work using this [source trim="true"]

Thank you

Code:
$myrowid = $input->get('rowid');

if($myrowid != "") {
echo "{fabrik view=list id=XX floors-table___building_id=[rowid]}";
} else {
echo "Please fill in the building data and click on "Save" before adding Floors and Neigbours";
}


Yes, last time I checked (recently) it's still working, and why not.
If you're having trouble with Sourcerre, you must contact the developer = Regular Labs. If you do, don't forget to tell them exactly what error you're getting, otherwise it's nearly impossible for anyone to help anywhere.

Also, @troester's post here above did not contain any code, so not sure what you're referring to in this regard.
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top