How do I relate a user to a channel entry from a form? I have a channel which has a relate to user field, how do I setup the front-end form which is a user details update form so they can select a channel entry from a drop down and when saved, have it relate that user to the channel entry.
When saving an entry field type as part of your plug-in it needs to be an array of IDs in order to work correctly. This can either be handled via a plug-in or in the form by passing the value as an array to that field handle.

Plug-in:

$user-&gt;setContentFromPost(array(
    'entryField' =&gt; array(10)
));
$success = craft()-&gt;users-&gt;saveUser($user);


Front-end form:

&lt;input type="hidden" name="fields[relatedEntry][]" value="{{entry.id}}"&gt;