Using user_id in custom display

Hello Stephanie,

I’m trying to use the user_id parameter in a custom display short code to filter the display to show only the entries entered by a certain user. I’m using the following short code for that purpose:

[display-frm-data id=x user_id=y]

For y value, I tried putting in the user_id integer (as per the Knowledge Base) and also tried using user name (which is what the form entry refers to as user_id) and both methods don’t seem to be working for me: what actually happens is that the display displays several entries and not only the one entered by the specific user I want.

Filtering using entry_id, however, works but using the user_id would make things easier for me as I have to repeat this process for many users.

Any idea on what I’m doing wrong?

Thanks in advance for your help.

Do you have a user ID field in the form you are using to create your custom display? This parameter is specifically linked to user ID fields.

Yes I do: it is a hidden user ID field (generated automatically by selecting the option of allowing one entry per each logged-in user).

I also went to the individual field in the entries and validated the user_id the form has for each user and used the same value (username) in the custom display but without success. It looks like the custom displays ignores the user_id option all together and proceeds to list all entries.

It looks like this shortcode parameter is only used if you have a where row in your custom display for the user ID field. This value will override what it there, but doesn't add it in if it's not. Does that help?

So if I understand correctly, the user_id parameter isn't used to filter the custom display of entries (similar to entry_id)? I'd have to use the entry_id which serves the purpose but just adds an additional step of looking up the entry_id for each user entry.

Thanks for your help.

The user_id parameter is used, but only if you add a where row in your custom display. Here's an example from the custom display knowledge base page:

Topic closed.