user profile with fabrik

samani

Member
hi
i want what i can with fabrik to create user profiling system.
or better to use community builder system? i want vs these two.
this link is not work:
http://fabrikar.com/help/tutorials/details/3/12-create-a-profile

can anyone say me what is final result of that tutorial and what idea we can implement with the fabrik in the profiling system?
simply i want hear titr of features you can suggest for profiling system with fabrik or you was say in that tutorial.
tnx
 
The mechanism we provide is by using the 'usekey' and 'rowid=-1' combination for loading a form.

The trick is to have a 'user' element on the form. For example, call it 'userid'. Then in a Fabrik form menu item to that form, specify:

Use key: userid
Row ID: -1

What that tells Fabrik is to use 'userid' as the field to lookup the rowid from, instead of the usual PK (primary key). And the rowid of -1 says "use currently logged in user ID".

So when we load the row for that form, instead of looking up "WHERE id = 123", we lookup "WHERE userid = 123", using the logged on user ID as the value. If there isn't an existing row for that user, one will get created when they submit the form.

This allows you to have a list which is keyed per-user, where each user has only one record.

If you only want users to be able to see their own profile, you can then add a pre-filter to the list ...

Field: userid
Condition: EQUALS
Value: {$my->id}
Type: text

... which will restrict list view.

And you can add normal list ACL's for 'edit', using the "or use field" set to 'userid', so users can only edit their own row.

-- hugh
 
The mechanism we provide is by using the 'usekey' and 'rowid=-1' combination for loading a form.

The trick is to have a 'user' element on the form. For example, call it 'userid'. Then in a Fabrik form menu item to that form, specify:

Use key: userid
Row ID: -1

Hugh, you said:

"The mechanism we provide is by using the 'usekey' and 'rowid=-1' combination for loading a form.

The trick is to have a 'user' element on the form. For example, call it 'userid'. Then in a Fabrik form menu item to that form, specify:

Use key: userid
Row ID: -1

What that tells Fabrik is to use 'userid' as the field to lookup the rowid from, instead of the usual PK (primary key). And the rowid of -1 says "use currently logged in user ID".

So when we load the row for that form, instead of looking up "WHERE id = 123", we lookup "WHERE userid = 123", using the logged on user ID as the value. If there isn't an existing row for that user, one will get created when they submit the form.

This allows you to have a list which is keyed per-user, where each user has only one record.

If you only want users to be able to see their own profile, you can then add a pre-filter to the list ...

Field: userid
Condition: EQUALS
Value: {$my->id}
Type: text

... which will restrict list view.

And you can add normal list ACL's for 'edit', using the "or use field" set to 'userid', so users can only edit their own row.

-- hugh"


I have set up a client profile that has a userid element. I also have a module used to display the form for the person to enter their data. On the module I say Row ID: -1 and Key: userid. However, when the form populates the table, the user ID is not used as the primary key. Also, whenever I update any data on the profile, it adds another record. This is an issue for many reasons. How do I fix this issue?
 
Just to check something, is the behavior the same if you use a normal menu link rather than a module (with the same usekey/rowid settings)?

Sent from my HTC6545LVW using Tapatalk
 
Just to check something, is the behavior the same if you use a normal menu link rather than a module (with the same usekey/rowid settings)?

Sent from my HTC6545LVW using Tapatalk


I can't believe it - it works great from the menu item! Actually I do believe it, I just can't believe all the time I spent trying different things and the hours of reading through the forums and this is all it took. Thank you!!!!

I don't understand why it won't work from the module. I'm using Gridbox and if I use menu items it's very hard to style the layout of the data - especially since I'm not a coder. I've learned what I have to for .htaccess, php files, and making some minor html and css changes, but I don't really code.

With Gridbox I pretty much have to use one of their pages to be able to style anything. I know I can include menus on a gridbox page, but I don't know if that will make any difference on how it shows up on the site.

Anyway, thanks for the help. I'm sure I'll be asking more questions as the current forms look terrible on phones. But, I'll research it tomorrow. I think once I get past the phone and tablet view issue I'll love it. So I will be purchasing one of your subscriptions - at least for a bit. Thanks again!

Update - actually, I did try using the menu item earlier, but it wasn't showing the links to my other forms (linked via database join) and neither was the display details from the menu item. What I didn't realize then was at the time the form had "Show Related data links" set to no. Anyway, thanks for the help - I think we're on the right track.
 
Last edited:
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top