Add user to entry user field [RSVP to Event] I'm trying to add an RSVP button for users to register their attendance at my events. Once they click the button, I would like them to be added to a field called eventAttendees on the event entry.

My guess is this could be done as a form submission, and this is as far as I've gotten before getting a bit lost. I'm not sure how to pass the user ID to the entry.

&lt;form method="post" accept-charset="UTF-8"&gt;
  {{ csrfInput() }}
  {{ hiddenInput('entryId', event.id) }}
  {{ hiddenInput('userId', currentUser.id) }}
  &lt;input type="hidden" name="fields[eventAttendees][]"&gt;
  &lt;button type="submit" class="btn btn-primary"&gt;RSVP&lt;/button&gt;
&lt;/form&gt;


Would appreciate any help!
You could do this:

&lt;form method="post" accept-charset="UTF-8"&gt;
    {{ csrfInput() }}
    {{ actionInput('entries/save-entry') }}
    {{ hiddenInput('entryId', event.id) }}
    {% for user in event.eventAttendees %}
        &lt;input type="hidden" name="fields[eventAttendees][]" value="{{ user.id }}"&gt;
    {% endfor %}
    &lt;input type="hidden" name="fields[eventAttendees][]" value="{{ currentUser.id }}"&gt;
    &lt;button type="submit" class="btn btn-primary"&gt;RSVP&lt;/button&gt;
&lt;/form&gt;


The for loop in there is to ensure that you do not remove any value (users) that have already RSVP. This is similar to Uploading Files from Front-End Entry Forms