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

User Form Edit and View

An "unexpected end of file" usually means a file got truncated during an update, or you have some custom code with a syntax error (maybe in a calc).

-- hugh
 
If you make sure your My Sites is up to date, and put in the notes anything I need to know (which form, front end menu for it, etc), I'll take a look when I get some time.

-- hugh
 
Just letting you know I haven't forgotten, but I'm moving house this week, it'll be next week before I can get to this.

Sent from my HTC6545LVW using Tapatalk
 
Back to my original question... How would one have an user complete a form and then view it to edit or add to it at a later date and then allow only another specific user to view that completed/edited form after it has been completed/edited?

I know how to show in list with pre-filter using this
where:
field = your-user-element(raw)
condition: equals
value: {$my->id}
type=text
But How do I allow a user to view another specific user's record ... another table has a specific user id that stores which user is allowed to view the original users record that they had created.
 
Last edited:
But How do I allow a user to view another specific user's record ... another table has a specific user id that stores which user is allowed to view the original users record that they had created

You'd have to create a subquery in the prefilter. So assuming you have a table called "formusers", which has two fields, 'owner' and 'editor'. And you original list has two fields 'owner' and 'completed' ... and once 'completed' is set, you only want to allow the 'editor' from the other table to edit ... but if 'completed' is not set, the 'owner' can edit ... you'd need four pre-filters ...

field: completed
condition: equals
value: 0
type: text

field: owner(raw)
condition: equals
value: {$my->id}
type: text
join: and
group[ to previous: yes

field: completed
condition: equals
value: 0
type: text
join: or
grouped to previous: no

field: id
condition: IN
value: SELECT id FROM maintable LEFT JOIN formusers ON formusers.owner = maintable.owner WHERE formusers.editor = '{$my->id}'
type: query
join: AND
groups to previous: yes

-- hugh
 
Display_Details_tab.png Detail_Display_Option_tab.png
Thanks Hugh... I will use that in a later version...
but where do you place this pre-filter for a Detail Display in the Fabrik Menu Item?
I created a field that has the user id for the table record( in the same table now) that I want to display the record for the assigned viewer.

Do I do this in a php snippet in the plugin processing before loading ?
I just want to display... so should I just create another form list to the same table but no updating buttons? I have a user id field in the same table that points to a record that that user can view but not edit.
 
Last edited:
Sorry, I'm completely confused. You talked about having another table with the user id of the editor in it. And I didn't know you were talking about a menu link.

For menu link, if you just have a simple field on the same table with a userid in it, and that field is unique (so there's only one row in the table with that userid), you can set rowid=-1 and put the field name in "Key name", like "editor" (short name of the element).

-- hugh
 
BTW, when I offered to look at your site I thought you had a Pro sub for some reason, but looking at the records it looks like you haven't had a sub since 2013.

-- hugh
 
Sorry, I'm completely confused. You talked about having another table with the user id of the editor in it. And I didn't know you were talking about a menu link.

For menu link, if you just have a simple field on the same table with a userid in it, and that field is unique (so there's only one row in the table with that userid), you can set rowid=-1 and put the field name in "Key name", like "editor" (short name of the element).

-- hugh
I tried that... but it came up as the logged in user record... So I guess I had the name wrong or something...
UserID unique for each user... and the field I want to use is a field with the user id of the record to be viewed... does that make sense...
 
I did get the name wrong... it is displaying a record but not the record I expected... seems to be one off...

User 640 needs view User 641

but it shows User 639 record instead
 
Last edited:
After some testing ... With about 10 records... I could not achieve the row id / keyname for displaying a detail record with a field that had the id of the row I wanted to display to the viewer. It seems that it finds a record but not the one assigned. Each time it does find the same record which is incorrect.

User ID which= {$my->id} | Assigned to be Viewed ID (Expected) | Displays USER ID


640 | 643 | 647
642 | 644 | 648
643 | 648 | 640
644 | 646 | 642
645 | 647 | 649
646 | 649 | 644
647 | 640 | 645
648 | 642 | 643
649 | 645 | 646
 
Last edited:
Anyone have a work around since it seems the -1 / keyname does not seem to work

no value in the viewer id field results in displaying the user's own record

Would be nice to have a pre-filter tool available for displaying a form record using detail display from the menu link
 
Last edited:
For menu link, if you just have a simple field on the same table with a userid in it, and that field is unique (so there's only one row in the table with that userid), you can set rowid=-1 and put the field name in "Key name", like "editor" (short name of the element).

Okay I think I have sorted out what is happening with the attempt on displaying a record of an user created record for an assigned user to view.

If you look at the above table you will see a listing of user records in a table. Each record has an unique ID (640, 642, 643 etc.) The next column is the assigned viewer of the record. (643, 644, 648, etc.) Each viewer id is unique for each User created record. Both fields reside in the same table.

What is happening when setting the rowid to -1 and the Keyword to the Viewer ID element name is that it is populating the display with the assigned viewer's "assigned viewer's" data and not the assigned user's data. (i.e. 640 should display 643 data and not the data for 647 which is the assigned viewer of user ID 640.

How does that work?

Can I get a menu item display of the User's data by the assigned Viewer when the viewer is logged in? If so how? If not... work around thoughts?
 
Last edited:
We are in need of some funding.
More details.

Thank you.

Staff online

Members online

Back
Top