在配置文件 / ZF 中定义 ZendX_JQuery_Form_Element

发布于 2025-01-02 01:13:48 字数 913 浏览 1 评论 0原文

我已将所有 Zend Form 内容放入 .ini 文件中。例如:

elements.foo.type                                            = "text"
elements.foo.options.required                                = true
elements.foo.options.label                                   = "bar"
elements.foo.options.size                                    = "32"
elements.foo.options.maxLength                               = "64"

如何在配置文件中添加一些 ZendX_JQuery_Elements

我已经在 application.ini 中加载了 jQuery,并在布局中使用了 $this->jQuery();

elements.baz.type = "datepicker"

但我无法在我的特定 ini 文件中以常规方式添加一些装饰器。

装饰器的错误消息:

如果没有至少一个实现“ZendX_JQuery_Form_Decorator_UiWidgetElementMarker”接口的装饰器,则无法渲染 jQuery 表单元素。该标记接口的默认装饰器是“ZendX_JQuery_Form_Decorator_UiWidgetElement”。提示:ViewHelper 装饰器无法正确渲染 jQuery 元素。

我该如何装饰这些东西?

I have put all my Zend Form Stuff in a .ini file. Things like:

elements.foo.type                                            = "text"
elements.foo.options.required                                = true
elements.foo.options.label                                   = "bar"
elements.foo.options.size                                    = "32"
elements.foo.options.maxLength                               = "64"

How can I add some ZendX_JQuery_Elements in my configuration file?

I have loaded jQuery in my application.ini and used it in my layout with $this->jQuery();

elements.baz.type = "datepicker"

works.

But I can't add some decorators on the regular way in my specific ini file.

The Errormessage for the Decorators:

Cannot render jQuery form element without at least one decorator implementing the 'ZendX_JQuery_Form_Decorator_UiWidgetElementMarker' interface. Default decorator for this marker interface is the 'ZendX_JQuery_Form_Decorator_UiWidgetElement'. Hint: The ViewHelper decorator does not render jQuery elements correctly.

How can I decorate these things?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文