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)
, myPersonForm
will now have an 'Address' label within it, in addition to the labels for the fields that make up theAddressForm
. 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
最满意答案
感谢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.
相关问答
更多-
正如您在异常消息中看到的那样,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") .to("e ...
-
请检查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 dont wan ...
-
Vagrant错误:无法在Linux guest虚拟机中挂载文件夹(Vagrant error : Failed to mount folders in Linux guest)[2023-02-22]
插件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 guest ad ... -
感谢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 ...
-
Apache Camel FTP 550删除linux中的文件时出错(Apache Camel FTP 550 Error while deleting the files in linux)[2023-12-20]
最后我找到了答案,问题在于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 -> d ... -
Camel中的文件读取问题(File read issue in Camel)[2022-02-25]
您可以将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 multi t ... -
在Virtual Box上运行的Mint Linux中永久挂载共享文件夹(Permanently mount shared folder in Mint Linux running on Virtual Box)[2022-05-15]
您可以通过将其添加到fstab来启动共享文件夹。 You can mount the shared folder on startup by adding it to fstab. -
您可以使用ControlBus组件在运行时使用其routeId启动/停止路由。 此示例显示如何在处理文件时停止路由并在处理后重新启动它。 您可以将启动操作附加到onCompletion回调并实现更强大的逻辑。 from("direct:DirectRoute") .routeId("DR") .to("bean:processDirectQueueBean"); from("file:" + recoverableErrorsFolder +"?noop=true") ...
-
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 latt ...
-
你不能直接在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=${bean:m ...