How to join two non-editable records collected from a 2-tab form?

Pavlov

Member
Hi,

That's what I would like to do:

I have two forms, which I would like to put as tabs on the same form.
A registered user should be able to create input in the first form but afterwards this user should not be allowed to edit or delete anything from it. However, the user should have the possibility to input (later) independently data in the second form. This new data has to be associated to the data from the first form input, so that one should be able to present it all within a single row of a table.

To put it another way:
Once the first half of the row is submitted I do not want anybody to be able to edit it (not even the user that created it), but I do want that the same person that created that half of the row be able to create later the other half and then be unable to edit it either.

My questions are:
1. How do I populate two tables independently using the two tabs of the same form? I am unable to place two different groups belonging to two different tables to the same Form. Somehow I managed to create the tabs but I think the data was going into the same table. For some reason each form appears to have its own group, and groups not associated to a form do no appear in it.

2. Supposing I manage to populate the two tables from the same form (with your help), how do I join them to get a new table row combining data from both halves?

P.S.
I have the latest versions of Joomla and Fabric.
 
You 2nd table needs a foreign key to the first one (or vice versa), then you can join the two database tables in your list settings (repeatable=no).
This will give you a new group, i.e. you have a list and form linked to both database tables with one group for each table.

For "editing later" you can e.g. use related data or a list copy with different access settings.
 
Dear Troester, thanks for the answer. I had already read about that foreign key in the list joins tutotial (http://fabrikar.com/forums/index.php?wiki/list-joins/), but I had not been able to figure out how to generate it, as it seems there is no autonumerical element apart from the internal id element which is automatically generated and cannot be used twice. I had been trying to join the two lists within the data options of a third list using the internal id's of the original lists and two different joins (just one doesn't show any data) but that doesn't work as it should. Could you explain the procedure in somewhat more detail ?
 
Not quite sure what you are trying to do.

Do you have/need two database tables?
Then they must be somehow related which is done with a foreign key in one of the tables. A foreign key is not autoincrement, it's a column storing the id (primary key) of the related record in the other table. In Fabrik you usally have a databasejoin element pointing to the other table.
Then you join these tables.

If you only want to have the possibility to edit parts of the record at different times you can use just one database table and put the Fabrik elements you want to handle differently into two different groups.

In both cases you may use two Fabrik lists pointing to the database table(s) (you can copy your list) and use different access settings for the lists and the groups.
E.g.
list1: only "Add Record" and group2 hidden
list2: only "Edit record" for the user who has created it and group1 readonly
 
Thank you very much Troester! That helped me to solve the issue. I have left a single list with 2 groups associated and elements within them configured to editable only by Superuser, and that seems to work perfectly.
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top