Field to retrieve user id

More
6 years 5 months ago #73978 by Chabi01
Hello,
I use on a site JEvents.
With JEvents, i have a plugin to show events create by a specific user.
The code is
Code:

Code:
{jevu}ID_of_the_user{/jevu}
So it's quite simple with a text field : opening and closing format and i type the id of the user.
This field is not modified after.
Ok.
Now, to "simplify" this, i would like to do this like this : with the same format (opening and closing), i would like to have a dropdown list with all the user to get their id without jungling between the list of users and my field. I have a list of all users and when i select a user, the field is filled with the id of the user.
I could do this with the select field but i would like to know if i a field can retrieve all the user list in the database to prevent to create the list manually (and also if there is a change in the user list to avoid wrong id because they have been changed or because there is new users).

Thanks !
Xavier

Please Log in or Create an account to join the conversation.

More
6 years 5 months ago #73983 by Chabi01
Replied by Chabi01 on topic Field to retrieve user id
Forget this : i only have to fill the select with a sql query.
Sorry for this :)
Xavier

Please Log in or Create an account to join the conversation.

More
6 years 5 months ago #73991 by micker
Replied by micker on topic Field to retrieve user id
1 create select field
use sql mode
create your sql inside (use popup for information id user need to a be a value)
and use prefix and suffix
but we can't realy help you for sql request ask to jevent dev

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
6 years 5 months ago #73992 by Chabi01
Replied by Chabi01 on topic Field to retrieve user id
Hi Micvker,
Thanks, i found the solution before your answer :)
Xavier

Please Log in or Create an account to join the conversation.

More
6 years 5 months ago #73994 by micker
Replied by micker on topic Field to retrieve user id
maybe you can share it lol

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
6 years 5 months ago #73996 by Chabi01
Replied by Chabi01 on topic Field to retrieve user id
Nothing special in fact :-)

- A field select.
- A query "SELECT id AS value, name AS text FROM #__users"
- The code to activate the plugin as {jevu} - {/jevu} in opening and closing
- The field is also setted up to send the value (and not the label)
- Content plugin are activated

And this is working well : i have my list of user in my dropdown, and by selecting the user in the list, i have the events for this user in his page.

Xavier

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.743 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline