1

Is it possible to include a Users Fields Type on a front end form? I'd like to allow people to choose existing users on a front end form rather than giving them access to the admin area of the Craft site.

0

Sure is! You'll want to bookmark this ridiculously handy page, but if you look under "Relations" you'll see the syntax you're looking for:

<select multiple name="fields[fieldHandle][]">
    <option value="13">Username One</option>
    <option value="42">Username Two</option>
    <option value="144">Username Three</option>
</select>
2
  • Thank you Brad! Would I be able to use code to include all users in a specified user group or do I need to list them all out like the code above?
    – Lori
    Jun 23 '16 at 1:29
  • Just use craft.users.group to the ones in the group you're looking for. craftcms.com/docs/templating/craft.users#group
    – Brad Bell
    Jun 23 '16 at 3:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.