We have setup a form/view to create an entity which works, but we are trying to add a second form/view to the page (to update the created values) with the field for the related entity hidden. If we submit the form with the hidden field, the field is interpreted as being empty when in fact we just want to skip the need to fill it in/use the previous value.
{{ form_start(form) }}
{% do form.name.setRendered %}
{{ form_widget(form.quantity) }}
{{ form_widget(form.submit) }}
{{ form_end(form) }}
If we submit the form, our relation is being removed instead of keeping the previous value.
We have also tried to disable the field with {{ form_widget(form.name, { 'attr': {'disabled': 'disabled'} }) }} but this although disable the field, still return the same effect.
In the controller we can see where the value is stripped when the $form->handleRequest($entity) runs but we cannot find a way to ensure the relationship is kept without displaying the field.