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.

1 Answer 1

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
    Commented Jun 23, 2016 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
    Commented Jun 23, 2016 at 3:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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