Symfony2 standalone form component - setting up a form(Symfony2 独立表单组件 - 设置表单)
问题描述
我正在尝试将 Symfony2 表单构建器组件实现为独立的.文档不过并没有真正谈论这个,只是与使用整个框架有关.
I'm trying to implement Symfony2 form builder component as a standalone. The documentation doesn't really talk about this though, just in relation to using the whole framework.
独立版在 Github 上,但没有文档.
The standalone is on Github but has no docs.
我四处搜索,看到有几个人问这个问题,但似乎没有人有任何答案.
Ive searched around and seen a few people ask this question but none seems to have any answers.
我所需要的只是关于如何设置、构建和查看表单的基本指南.
All I need is a basic guide on how to setup a form , build it, then view it.
有人吗?
推荐答案
编辑:我下面的第一个响应现在已经过时(并且链接不再起作用).请参阅https://github.com/webmozart/standalone-forms 了解最新状态艺术解决方案.
Edit: My first response below is now obsolete (and the link does not work anymore). Please refer to https://github.com/webmozart/standalone-forms for a state-of-the-art solution.
以前的(现已过时的)答案:
我已经努力并设法显示了一个表单(使用 PHP 引擎,而不是 Twig).
I've tried hard and managed to display a form (using PHP engine, not Twig).
确实需要一些组件:Form,还需要 ClassLoader、EventDispatcher、Templating(用于渲染) 和翻译(用于渲染标签).您还需要 FrameworkBundle 包中的一些资源(主要是模板).
Indeed you need a few components: Form, but also ClassLoader, EventDispatcher, Templating (for rendering) and Translation (for rendering labels). You will also need some resources from the FrameworkBundle bundle (mainly templates).
更多信息:http://forum.symfony-project.org/viewtopic.php?f=23&t=36412
还有我的迷你教程:http://n.clavaud.free.fr/blog/index.php?article31/symfony2-standalone-form-component-tutorial
这篇关于Symfony2 独立表单组件 - 设置表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Symfony2 独立表单组件 - 设置表单
基础教程推荐
- PHP PDO MySQL 查询 LIKE ->多个关键词 2021-01-01
- 如何替换eregi() 2022-01-01
- 有什么方法可以用编码 UTF-8 而不是 Unicode 返回 PHP`json_encode`? 2021-01-01
- 如何在 Laravel 中使用 React Router? 2022-01-01
- 学说 dbal querybuilder 作为准备好的语句 2022-01-01
- YouTube API v3 点赞视频,但计数器不增加 2022-01-01
- PHP 类:全局变量作为类中的属性 2021-01-01
- 在PHP中根据W3C规范Unicode 2022-01-01
- 如何在 Laravel 5.3 注册中添加动态下拉列表列? 2021-01-01
- Cron Jobs 调用带有变量的 PHP 脚本 2022-01-01
