Is it possible to have an author dropdown select field in a SafeCracker form, in a similar way to how you can have a Status dropdown select field with the following code?
{status_menu}
<label for="status">Status</label>
<select name="status" id="status">
{select_options}
</select>
{/status_menu}
I’ve searched the docs and EE forums but can’t find anything, but hoping there’s a way of doing this.
Thanks for any help,
Ste
Edit:
Thanks to Tyssen’s reply below, I’ve just implemented this solution in a SafeCracker form and it works great. Just one note though – the name should be author_id rather than author. Here’s my final code, including a conditional to show the entry’s current author:
<label>Author</label>
<select name="author_id">
{exp:query sql="SELECT member_id, screen_name, group_id FROM exp_members ORDER BY screen_name ASC;"}
<option value="{member_id}" {if "{member_id}" == "{author_id}"}selected="selected"{/if}>{screen_name}</option>
{/exp:query}
</select>
Use the query module maybe?