如何将onfocus添加到z3c.form inpu

2024-05-20 18:44:00 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在plone中开发一个站点,目前正在使用python和z3c.forms编写一个表单

目前我正在使用一个接口来定义表单域,比如。。。你知道吗

class IMyInterface(Interface):

    name = schema.TextLine(
            title=_(u"Name"),
            default=_(u"Name")
        )

然后分配给像。。。你知道吗

fields = field.Fields(IMyInterface)

这是然后呈现在模板中使用塔尔像。。。你知道吗

<div tal:replace="structure python: view.contents" />

我想在输入的标记中呈现onfocus属性。有办法吗?你知道吗


Tags: z3cnamedefault表单定义站点titleschema