user plugin with default value as current user

Status
Not open for further replies.

mutig44

New Member
Hi

In a form I have a "user_id" element that is hidden.
My wish is that when I validate the form the "user_id" of the connected user is saved by default.
I tried different options of the "user plugin" but when I consult my records, the value of the "user_id" is always NULL.
Apart from that everything works fine, no error message and my form registers well but with this NULL value for the id_user.
When I do not hide the element "user_id", I see that I have a drop-down list. But I wish that by default this list is filled with the user_id of the user connected to the form.
What is the correct way to use this user_plugin if I want to register the "user-id" of the user who validates the form (the current user) ?
Tx!
 
What do you mean with "connected user"?
The user plugin defaults to the user who is logged in.
You can enable the option to store the user who is editing (Update on Edit).
 
I'm talking about the user is connected, that's it.
I found my mistake. It's a bad move on my part.
Sorry for the inconvenience and thank you for the answer that made me realize my mistake.
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top