<p>So, I found the answer after much digging.</p>

<p>Thanks to this answer <a href="https://craftcms.stackexchange.com/a/9831/7962">https://craftcms.stackexchange.com/a/9831/7962</a></p>

<p>I see that the entries field type has to be referenced with an additional set of brackets.  My form now works after changing my input to:</p>

<pre><code>&lt;input type="hidden" name="fields[event][]" value="{{ eventId }}"&gt;
</code></pre>

CC BY-SA 3.0
2018-02-08T02:49:32.473Z
2018-02-08T02:49:32.473Z
David Pritchard
<p>I'm new to Craft.  I've been trying to wrap my head around how to design the concept of Events and Event Registrations.  Currently I have both Events and Event Registrations as their own Sections as Channels.  An Event Registration has an Entry field to tie it back to an Event.  Our admins will create an Event, but we want the public to be able to register for an event via a form.  I'm using the guest-entries plugin and am very close to getting this all tied together, but am unsure how to pass the reference to the Event in the form.</p>

<p>I can pass it in via the url <code>http://example.demo/register.html?eventId=99</code></p>

<p>But what do I reference so that the correct info will be sent to identify the Event entry when the form is submitted?</p>

<p>I assume I can send it via a hidden field, but am not sure what value to send:</p>

<pre><code>    {% set eventId = craft.request.getParam('eventId') %}
    &lt;input type="hidden" name="fields[event]" value="{{ eventId }}"&gt;
</code></pre>

<p>OR </p>

<p>If anyone sees a better way to design this, I would be open to other ideas.</p>

<entries><form><guest-entries>
How to reference an entry field in a guest user form?
# How to reference an entry field in a guest user form?

(Asked by: username_0 on 2018-02-08)

I'm new to Craft.  I've been trying to wrap my head around how to design the concept of Events and Event Registrations.  Currently I have both Events and Event Registrations as their own Sections as Channels.  An Event Registration has an Entry field to tie it back to an Event.  Our admins will create an Event, but we want the public to be able to register for an event via a form.  I'm using the guest-entries plugin and am very close to getting this all tied together, but am unsure how to pass the reference to the Event in the form.
I can pass it in via the url http://example.demo/register.html?eventId=99
But what do I reference so that the correct info will be sent to identify the Event entry when the form is submitted?
I assume I can send it via a hidden field, but am not sure what value to send:
    {% set eventId = craft.request.getParam('eventId') %}
    

OR 
If anyone sees a better way to design this, I would be open to other ideas.

**Tags:** entries, form, guest-entries

---

## 1 answers

### Answer by username_0 on 2018-02-08. Score: 3

So, I found the answer after much digging.
Thanks to this answer https://craftcms.stackexchange.com/a/9831/7962
I see that the entries field type has to be referenced with an additional set of brackets.  My form now works after changing my input to:


---

