Anything I should Know about User Element

Status
Not open for further replies.

eugenecjr

Member
I am using the user element to record the user that created a new record in a repeating group. I have this element hidden and when a new record is created the user's ID is recorded as '0' in the database, therefore not recording the database.

I have tired setting the element to not hidden and then using access settings to hide with odd results such as a user from another record instead of the user currently logged in and creating the new repeat row being input.

-Eugene
 
It seems the user element doesn't do in repeat groups.
But if you only need to log who has created the group entry you can switch to a dbjoin element (to #_users) and set the default to {$my->id}
 
I think I've bumped on a similar problem sometimes far in the past. User element is updated on form load, when your repeat rows do not exists yet. So you would have to update these elements with Javascript adding your code to form_XX.js file and execute on "fabrik.form.group.duplicate.end" event.

EDIT: as always, Troester's suggestion is probably better if it works (can't see why it shouldn't).
 
Thanks guys, let me give troester's suggestion a try, no offence juuser, and if that does not work I will go with the form_XX.js file. Also thanks for the info on the user element. Not always sure when something seems like it should work whether it is something I am doing or by design.

-Eugene
 
Troaster's suggestion resolved the issue. juuser's solution would also work but would have taken a little more time to setup. In this case it is a case of perferences.
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top