当我使用默认的变形表格时。这不是我需要的。
如何定制呢?
例如,我需要这个:
firstname:[_______] lastname:[_______]
*username: [____________________] alink
其中 [ _ _] 表示正常的 html 输入。
应该重写模板吗?
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)