3

当我使用默认的变形表格时。这不是我需要的。

如何定制呢?

例如,我需要这个:

firstname:[_______]  lastname:[_______]
*username: [____________________] alink

其中 [ _ _] 表示正常的 html 输入。

应该重写模板吗?

4

1 回答 1

1

This is a css issue, to provide a custom CSS class to a deform input you need to use the following:

text_input = deform.widget.TextInputWidget(
    css_class='yourdivnamehere')

Then inside deform you can:

first_name = colander.SchemaNode(colander.String(),
            widget = text_input)
于 2014-01-06T12:35:24.347 回答