我正在使用Plone 4.2(autoform 1.3.2),似乎无法控制我的dexterity表单文本字段中的行数。我看到autoform 1.4及以上允许你直接在架构中这样做:
siteAddress = schema.Text(
title=_(u"Physical Address of Surrendered Site"),
rows = 10,
required=False,
)
无论如何(除了通过自定义CSS)我可以在AF 1.3.2中控制它吗?
答案 0 :(得分:0)
您必须使用plone.directives.form:
from my.package import MessageFactory as _
from plone.directives import form
from plone.supermodel import model
from zope import schema
class IMyType(model.Schema):
form.widget('text', cols=80, rows=10)
text = schema.Text(
title=_(u'Text'),
default=u'',
required=False,
)