When using a form block on a content item page, linking the new content item to content item from the page allows to use the content in context, for example when using comments.
- Add a select box field "Link to content item" to the form block form
- Default value is "Do not link"
- Other values are the relation names, with the word " relation" added: "Media relation", "Keywords relation"
- When a relation has been chosen en the form block is submitted, add a relation to the content item, with the active content document as target
- Add a form block and choose a relation
- Submit the form block on a content item page: content item need to be added as a relation
- Submit the form block on a static page: no item should to be added as a relation, the form block will be submitted succesfully