• A new version of Full Calendar is now available.

    See the details here

Filter menu list with Joomla Users Extra Fields

jo-ka

Member
Hello.

Usually, when I want to filter records, by user, on a menu list, I use to use the object: {$my->id}.

Something like this:
upload_2023-9-5_16-0-9.png

Now, as you might now, Joomla has the ability to create extra fields for users. I've created an extra field named keyid and it available to fill, on user creation.

upload_2023-9-5_16-1-14.png

So, do you know if there's a way for the Pre-filter to access this new object, in order to filter the list on the menu?

I've tried with:

{$my->keyid}
{$field->keyid}

But with no avail.

Anyone have used this before?

Thanks in advance.
 
Assuming you have a "field_value" element in your Fabrik list you should be able to pre-filter by a query. Something like:

Elements: "field_value"
Condition: Equals
Value: SELECT value FROM #__field_values WHERE field_id = 'your-field-id' AND item_id = '{$my->id}' - (Replace "your-field-id" with your custom field's actual id)
Type: Query

This is not tested in any way, so you might need to adjust.
 
Back
Top