Frontend form with relation to an entry I have a field called "assetId" from Entry "A" with Field Type "Entries" and Source "B". How can I build a form so that a relation between these two entries will be established.

In the craft backend I can add a new entry in Entry "A" and can use the Button "Add an entry" to select the suitable Entry from "B". This works fine. A record is written in the Table craft_relations.

How can I build a user form in the frontend to get this. I tried following form with a hidden field "fields[assetId]" which is set to the id of the suitable content:

&lt;form method="post" accept-charset="UTF-8" enctype="multipart/form-data" class="send-form" id="send-form"&gt;
    &lt;input type="hidden" name="action" value="entries/saveEntry"/&gt;
    &lt;input type="hidden" name="sectionId" value="34"&gt;
    &lt;input type="hidden" name="enabled" value="1"&gt;
    &lt;input type="hidden" name="fields[assetId]" value="1478" id="hidden-assetID"&gt;
    [... some more fields ...]
     &lt;input class="btn-vote" type="submit" value="send"&gt;

&lt;/form&gt;


The entry is saved correctly, but without the assetId. There is no relation between targetId 1478 and the new entry in the Table craft_relations established. What am I doing wrong?
After research with lots of trail &amp; error I found the solution. I just had to add [] to my hidden field to establish the relation:

&lt;input type="hidden" name="fields[assetId][]" value="1478" id="hidden-assetID"&gt;


The leading hint was here: Setting User field type from a front end form