Symfony가 왜 이것을 수행하는지 이해할 수 없습니다.템플릿에 없지만 formType에있는 경우 Symfony가 양식 필드를 null로 설정하는 이유
는 심포니가 DateCreated
데이터베이스 값을 덮어 null
에 설정 내가 내 템플릿에 dateCreated을 표시하지 않습니다 이제 UserFormType 클래스
->add(username);
->add(datecreated);
있다고 가정합시다. 그래서 당신은 모든 필드 그렇지 않으면 설정됩니다 렌더링합니다 Additionally, if there are any fields on the form that aren't included in the submitted data, those fields will be explicitly set to null.
:
는 그 값을 설정하지에 문제가 널 (null)과하지 documentation에서 템플릿