我有这个小部件字段:
{% include "partials/field.html" with field=form_request.state|attr:"value:open"|attr:"readonly:true" %}
需要隐藏它,有人知道它需要的attr吗?,已经尝试过了:
{% include "partials/field.html" with field=form_request.state|attr:"value:Abierto"|attr:"readonly:true"|attr:"Hidden:true" %}
但它不起作用 感谢名单
答案 0 :(得分:2)
这是怎么回事?
{% include "partials/field.html" with field=form_request.state|attr:"value:Abierto"|attr:"readonly:true"|attr:"class:hidden" %}
和css:
.hidden{
display: none;
}
答案 1 :(得分:2)
对于隐藏的输入表单字段,您应使用type
属性,其值为hidden
- "type:hidden"
:
{% include "partials/field.html" with field=form_request.state|attr:"value:Abierto"|attr:"readonly:true"|attr:"type:hidden" %}