I'm new in Symfony2.I want to post a value from twig to controller. I know how to pass values through url. But i want How to post a data from twig to a controller action without passing that values to url?
This is not a limitation of symfony, but the http protocol: you can pass values using either GET or POST parameters. GET valuas are passed by simple urls, for post you need to use forms or javascript.
It is only a symfony2 related question if you want to embedd another controller in your view - for this, see the documentation
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.