Symfony admin generator : add user id before saving
问题 I'm creating my own blog engine to learn Symfony, and I have a question : In the generated administration pages for a blog post, I have a drop-down list of authors, to indicate the author_id. I'd like to hide that drop-down list, and set the author_id to the id of the current logged-in user when the post is created (but not when it is edited) How can I accomplish that ? Edit I've tried those : $request->setParameter(sprintf("%s[%s]", $this->form->getName(), "author_id"), $this->getUser()-