XF 2.1 Autocomplete userfield

Robert9

Well-known member
I have a form field to change userid/username in a table.
I tried to make this field searching for users after typing three chars, but i fail.
May someone tell me, what i have to add around the field (or the form) to make this happen, please?
 
This should help:

HTML:
<xf:tokeninputrow
    name="user_token_search"
    value="{$passedValue}"
    href="{{ link('members/find') }}"
    label="your label"
    min-length="3" />

You are looking specifically for the min-length value. So when someone types that 3rd character it will perform the search at "members/find".
 
Perfect! Thank you a lot.

Can i reduce the query to one or more usergroups directly from user_token_search" ?
 
Perfect! Thank you a lot.

Can i reduce the query to one or more usergroups directly from user_token_search" ?
Unfortunately, that action doesn't take any additional parameters except for the query string. You would need to do some custom coding to create a controller and action do perform that specific task.
 
Back
Top Bottom