Symfony嵌入式表单 - 可能不显示嵌入式表单的“父”标签?(Symfony embedded form - possible to NOT show embedded form's “parent” label?)

在Symfony中嵌入表单时,嵌入表单的标签被注入到父表单中。 例如:如果我有一个PersonForm并添加此代码$this->embedForm('Address', $addressForm) ,我的PersonForm现在将在其中包含一个“地址”标签,除了组成字段的标签AddressForm 。 我想保留单个字段的标签,但要删除“地址”标签,从而表明这两种形式确实是一种。

可以重写表单模板并手动遍历表单元素并逐个回显,但我经常遇到这种情况,我宁愿让Symfony自动处理它。


When you embed a form in Symfony, a label for the embedded form is injected into the parent form. For example: If I have a PersonForm and add this code $this->embedForm('Address', $addressForm), my PersonForm will now have an 'Address' label within it, in addition to the labels for the fields that make up the AddressForm. I'd like to keep the labels for the individual fields, but get rid of the 'Address' label, thereby making it appear that the two forms are really one.

It's possible to override the form template and manually iterate over the form elements and echo them one by one, but I run into this situation frequently and I'd prefer to have Symfony handle this automatically.


原文:https://stackoverflow.com/questions/6426837
2022-05-01 13:05

满意答案

感谢Claus和Namphibian,这实际上是对你们双方建议的用于映射windows文件夹的服务帐户的写​​访问权限的问题。 一旦我们提供了访问权限,它现在正在运行。 再次感谢。


Thanks Claus and Namphibian it was actually the issue with write access to the service account used to map the windows folder as suggested by by both of you. It's now working once we provided the access. Thanks Again.

相关问答

更多

如何使用camel-exec在Linux中移动文件?(How do you move a file in Linux using camel-exec?)

正如您在异常消息中看到的那样,applciation无法找到参数。 尝试这个: from("direct:exec") .to("exec:mv?args=test/directorySource test/directoryDestination") 请参阅此处的文档。 As you can see in the exception message the applciation can't find the arguments. Try this: from("direct:exec") ....

Apache Camel不会在源文件夹中保留文件(Apache Camel does not retain file in source folder)

请检查Camel-File组件中的“noop”属性。 默认情况下它是“false”,因此它会将处理过的文件夹移动到.camel。 如果您不想将其移入.camel文件夹,请将其设为“noop”属性“true” 。 Please Check the "noop" property in Camel-File component. By default it is "false" so it will move the processed folder in to .camel . If you don...

Vagrant错误:无法在Linux guest虚拟机中挂载文件夹(Vagrant error : Failed to mount folders in Linux guest)

插件vagrant-vbguest 解决了我的问题: $ vagrant plugin install vagrant-vbguest 输出: $ vagrant reload ==> default: Attempting graceful shutdown of VM... ... ==> default: Machine booted and ready! GuestAdditions 4.3.12 running --- OK. ==> default: Checking for gue...

在LINUX上使用Camel 2.10挂载文件夹文件(Mount folder file handling using Camel 2.10 on LINUX)

感谢Claus和Namphibian,这实际上是对你们双方建议的用于映射windows文件夹的服务帐户的写访问权限的问题。 一旦我们提供了访问权限,它现在正在运行。 再次感谢。 Thanks Claus and Namphibian it was actually the issue with write access to the service account used to map the windows folder as suggested by by both of you. It's...

Apache Camel FTP 550删除linux中的文件时出错(Apache Camel FTP 550 Error while deleting the files in linux)

最后我找到了答案,问题在于commons-net-3.2 jar。 我升级到3.3版本,现在它的工作。 --Upgrade the version of commons uninstall commons-net 3.2 version install mvn:commons-net/commons-net/3.3 --Steps in Configuring Fuse Server 1. To view dependencies of a project bundle command...

Camel中的文件读取问题(File read issue in Camel)

您可以将readLock=changed与readLockMinAge一起使用。 也许还有第三种选择,当您的客户也可以放置一个准备文件时。 I have to use both options for good result. readLock will ensure that file will not be read while it is being written and preMove will be move the file to staging folder to avoid mu...

在Virtual Box上运行的Mint Linux中永久挂载共享文件夹(Permanently mount shared folder in Mint Linux running on Virtual Box)

您可以通过将其添加到fstab来启动共享文件夹。 You can mount the shared folder on startup by adding it to fstab.

根据文件夹内容暂停apache camel路由(Suspending an apache camel route depending of a folder content)

您可以使用ControlBus组件在运行时使用其routeId启动/停止路由。 此示例显示如何在处理文件时停止路由并在处理后重新启动它。 您可以将启动操作附加到onCompletion回调并实现更强大的逻辑。 from("direct:DirectRoute") .routeId("DR") .to("bean:processDirectQueueBean"); from("file:" + recoverableErrorsFolder +"?noop=true"...

yii linux中的驼峰案例类文件名(yii camel case class filenames in linux)

Gii使用表的名称来创建模型名称。 您是否将表productmanager或product_manager命名为? 后者将允许Gii自动创建名为ProductManager(CamelCase)的模型,否则它将是Productmanager。 希望这可以帮助。 Gii uses the name of your table to create the model name. Did you name your table productmanager or product_manager? The...

Apache Camel处理后移动文件(Apache Camel move file after processing)

你不能直接在uri中使用substring et all的复杂函数。 您可以使用bean来计算名称,并使用move=${bean:myBean.myMethod}然后在注册表中注册一个id为myBean的bean,然后计算名称。 You cannot directly in the uri use the complex functions with substring et all. You can use a bean to compute the name, and use move=${b...

相关文章

更多

《嵌入式开发(尚观科技)》(Embedded development)网络路由基础 ;已更新至第1集[MP4]

中文名: 嵌入式开发(尚观科技) 英文名: Embedded development 别名 ...

HTML5 智能form表单新属性

内容摘要:HTML5 智能form表单新属性,主要包括智能表单介绍和智能表单使用与规范。但在不同支持H ...

form load 的问题

baseinfoForm.form.load({ url: '/Url/Institution/In ...

《《Sundy--Android嵌入式底层开发课程共享版》《linux嵌入式系统开发.移植》》[压缩包]

中文名: 《Sundy--Android嵌入式底层开发课程共享版》《linux嵌入式系统开发.移植》 ...

深入嵌入式Java虚拟机

深入嵌入式Java虚拟机的内容摘要:内容简介近几年来,由于移动终端设备的蓬勃发展,各式各样的硬件设备、 ...

关于一个页面多个form问题????????

当前我的页面是用一个<c:forEach >遍历出来的。有多个form每个都不一样,我可以 ...

嵌入式实现 微信网页版 群发信息。

webchatHelper 一个微信群发信息的chrome扩展 咦,动态图片发不出? http:// ...

form中如何接收传入的值

如题,怎么给form的一个hidden隐藏域中传个id进去 问题补充:不能存在那里面 ...

ext里window里放form的布局?

window里布局了一个form,window有个最大化按钮,点击最大化,form的布局就占windo ...

最新问答

更多

获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)

我用Google搜索了一个解决方案。 “EnumDisplayModeProvider”是我自己设置网站的各种模式的枚举。 public EnumDisplayModeProvider GetDisplayModeId() { foreach (var mode in DisplayModeProvider.Instance.Modes) if (mode.CanHandleContext(HttpContext)) {

如何通过引用返回对象?(How is returning an object by reference possible?)

这相对简单:在类的构造函数中,您可以分配内存,例如使用new 。 如果你制作一个对象的副本,你不是每次都分配新的内存,而是只复制指向原始内存块的指针,同时递增一个也存储在内存中的引用计数器,使得每个副本都是对象可以访问它。 如果引用计数降至零,则销毁对象将减少引用计数并仅释放分配的内存。 您只需要一个自定义复制构造函数和赋值运算符。 这基本上是共享指针的工作方式。 This is relatively easy: In the class' constructor, you allocate m

矩阵如何存储在内存中?(How are matrices stored in memory?)

正如它在“熵编码”中所说的那样,使用Z字形图案,与RLE一起使用,在许多情况下,RLE已经减小了尺寸。 但是,据我所知,DCT本身并没有给出稀疏矩阵。 但它通常会增强矩阵的熵。 这是compressen变得有损的点:输入矩阵用DCT传输,然后量化量化然后使用霍夫曼编码。 As it says in "Entropy coding" a zig-zag pattern is used, together with RLE which will already reduce size for man

每个请求的Java新会话?(Java New Session For Each Request?)

你是如何进行重定向的? 您是否事先调用了HttpServletResponse.encodeRedirectURL()? 在这里阅读javadoc 您可以使用它像response.sendRedirect(response.encodeRedirectURL(path)); The issue was with the path in the JSESSIONID cookie. I still can't figure out why it was being set to the tomca

css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)

我认为word-break ,如果你想在一个单词中打破行,你可以指定它,这样做可以解决问题: .column { word-break:break-all; } jsFiddle演示。 您可以在此处阅读有关word-break属性的更多信息。 I think word-break, with which you can specify if you want to break line within a word, will do the trick: .column { word-break

无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)

我认为您忘记在分类时间内缩放输入图像,如train_test.prototxt文件的第11行所示。 您可能应该在C ++代码中的某个位置乘以该因子,或者使用Caffe图层来缩放输入(请查看ELTWISE或POWER图层)。 编辑: 在评论中进行了一次对话之后,结果发现在classification.cpp文件中错误地删除了图像均值,而在原始训练/测试管道中没有减去图像均值。 I think you have forgotten to scale the input image during cl

xcode语法颜色编码解释?(xcode syntax color coding explained?)

转到: Xcode => Preferences => Fonts & Colors 您将看到每个语法高亮颜色旁边都有一个简短的解释。 Go to: Xcode => Preferences => Fonts & Colors You'll see that each syntax highlighting colour has a brief explanation next to it.

在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)

你考虑过第三方拼写检查吗? 您可以将在C#中开发的自定义WinForms控件插入访问数据库吗? VB6控件怎么样? 如果你能找到一个使用第三方库进行拼写检查的控件,那可能会有效。 Have you considered a third party spell checker? Can you insert a custom WinForms controls developed in C# into an access database? What about a VB6 control? If

从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)

我有同样的问题,因为我在远程服务器上有两个图像,我需要在每天的预定义时间复制到我的本地服务器,这是我能够提出的代码... try { if(@copy('url/to/source/image.ext', 'local/absolute/path/on/server/' . date("d-m-Y") . ".gif")) { } else { $errors = error_get_last(); throw new Exception($err

从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))

我不确定我完全明白你在说什么。 你能编辑你的帖子并包含你正在做的Subversion命令/操作的特定顺序吗? 最好使用命令行svn客户端,以便容易为其他人重现问题。 如果您只是想获取文件的旧副本(即使该文件不再存在),您可以使用如下命令: svn copy ${repo}/trunk/moduleA/file1@${rev} ${repo}/trunk/moduleB/file1 其中${repo}是您的存储库的URL, ${rev}是您想要的文件的版本。 这将恢复该文件的旧版本,包括最高版本