Question
Is there an easy way to get the list of registered users for use in a form? I want a list box to be populated with their usernames
Environment
--
AlanJohnson - 28 Jun 2005
Answer
See
UserInfoPlugin. You may have to paste some HTML around it.
--
AntonAylward - 28 Jun 2005
Or you can use a SEARCH:
<form name="testing" action="%SCRIPTURL%/view%SCRIPTSUFFIX%/%MAINWEB%" method="get">
<select name="topic">
<option>Select user...</option>
%SEARCH{ "Name:;Email:;Country:" web="%MAINWEB%" type="regex" nosearch="on" nototal="on" format="<option>$topic</option>" }%
</select>
<input type="submit" value="Go" />
</form>
Which expands to this: (here limited to all Z* users because TWiki.org has so many)
This searches all topics in the Main web that contain "Name", "Email" and "Country" bullets. Alternatively, do a
FormattedSearch with
multiple="on"
on the
Main.TWikiUsers topic.
--
PeterThoeny - 29 Jun 2005