Create a Grid for multiple values in a form

linomsai

Member
Hello,
In my effort to build a stock inventory management, I would like to create a form wherein multiple values in a single form. For eg.
I have the following colums for Material Request:
1) Material Request Ticket
2) Item Code (cacasding dropdown)
3) Item Name (databasjoin)
4) Required by
5) Request date

When a new form is created, an auto generate Ticket is generated (i thank this forum for the step to create an unique id), now i would like to have a multiple request for the single generated ticket id. Will it be possible? Please help...
I have a screenshot attached to give an example.
 

Attachments

  • grid.png
    grid.png
    68.7 KB · Views: 702
Do you mean 1 x Material Request Ticket and multiple 2-5 ?

If so then Material Request Ticket would be in a group by itself with 2-5 in a repeat group, thus allowing you to assign multiple 2-5 to the 1 Material Request Ticket.

Essentially it would be a one to many relationship, 1 MRT can have multiple items.

.
 
Hi,
Thank you felixkat! Though new to Joomla and Fabrik, i started enjoying working with it.

Can i know the steps to do it or any link that shows the steps will be real helpful to me?

Basically when a user clicks on the add button for creating a request form, he should be able to add multiple items in the current request form....say like we have an "Add to Cart" kind of system before processing the order (probably like we have in Virtuemart). Similarly, once the user completes adding he can click on either on the Save Button which will insert the record into the table. And also, when the approver sees the Ticket id he should be able to see all the request material in the ticket.

For an example i have attached a screenshot of the way the form with a grid should be. I hope my query is a possibility.
 
Only way to display related data as a grid is to use Fabrik content plugin. As in F3 the groups has also intros then perhaps you can put the related list code into this (not tested yet). You need to create special group. In F2 I used display element for this purpose. If the list code doesn't work in group intro then it must work in display element.

That means when submitting data you use the repeated group and the special group with list code is hidden, but in details view you see actually a list view of the related table instead of the repeated group. Read about content plugin in Wiki.

Of course option to display a repeated group as a grid both in form and details view would be nice feature :) I tried to implement it in F2 and had almost success (only in details).
 
Hi,
Thank you Jaanus!
I believe did felixkat also referred to the same about having a repeat group? Please can you let me know the steps how to go about with it.

rgds.
 
Well, just tested. Unfortunately it couldn't be impemented yet with F3.

So I can write here some feature requests

1) option for group to be also shown "only in form view"
2) form/details view can also process Fabrik content plugin*
3) would be good that group intro doesn't delete content plugin code when submitting and the placeholders would be processed there

* - when trying to open details view with content plugin code I see an error message:
Fatal error: Cannot redeclare class FabrikControllerDetails in /.../components/com_fabrik/controllers/details.php on line 371
 
I did not find any steps about repeat group. I will try the ways provided by felixkat and jaanus. It would have been great to have a plugin to have grid as I thought of.
 
Dear Team,
Thank you for your help! As i was able to achive the requirement to add multiple records.

Ofcourse i wish and will try to contribute my part for the development.

And Jaanus, do bear with me for I missed out do search for tutorials.
 
1) option for group to be also shown "only in form view"
2) form/details view can also process Fabrik content plugin*
3) would be good that group intro doesn't delete content plugin code when submitting and the placeholders would be processed there

* - when trying to open details view with content plugin code I see an error message:
Fatal error: Cannot redeclare class FabrikControllerDetails in /.../components/com_fabrik/controllers/details.php on line 371

Well, now I can say that
1) done
2) actually it can process the plugins but when submitting content plugin code in intro the code is quickly stripped. Had to submit it through phpmyadmin
3) same thing like with form intro - plugin code can't be submitted in admin form. Is there some particular reason for it?

See again this test list
http://j25.nurmoja.net.ee/testin-nahtavust
 
So did your pull request get approved already? I don't see it.

I just tried inserting a {fabrik view=form id=1} into list, form and group intros, and it works just fine for me.

At what point do they get stripped when you try it?

Are you running any kind of custom filtering rules in J!? I'm using the standard, out-of-box blacklist option for my content filtering.

-- hugh
 
Murphy's law? :)

After I answered the questions above I tested again. And this time the code remained in its place!
But another problem still exist. Look at this:
http://j25.nurmoja.net.ee/testin-nahtavust/details/148/2
You see there a table view. Actually it should show only the last 2 rows with parent id = 2 as my code is
{fabrik view=list id=149 accesstest_443_repeat___parent_id=[rowid] clearfilters=1}
but all rows are shown. In F2 no such problems.
 
Well, now I can say that
1) done
2) actually it can process the plugins but when submitting content plugin code in intro the code is quickly stripped. Had to submit it through phpmyadmin
3) same thing like with form intro - plugin code can't be submitted in admin form. Is there some particular reason for it?

See again this test list
http://j25.nurmoja.net.ee/testin-nahtavust


Hello Jaanus,

I did not get how to access the "pull request" and also while accessing the test list i get "Page load error".

As i am new to the forum, can you pls help me to understand the test list and the"pull request" from git hub!
 
Hello Jaanus,

I did not get how to access the "pull request" and also while accessing the test list i get "Page load error".

As i am new to the forum, can you pls help me to understand the test list and the"pull request" from git hub!

Strange, for me it loads correctly. Perhaps it was some "bad moment" in whatever reason.

You don't need the pull request anymore as it was approved and merged into Fabrik master code. So go to https://github.com/Fabrik/fabrik , download zip from there (upper left corner), extract and upload.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top