【发布时间】:2015-06-02 09:24:43
【问题描述】:
我有一个表单,用户可以在其中输入问题。每个字段都有一个标签,但是在生产环境中我不想显示标签和某些 inputText 字段。我试图通过使用 'style -> "display: none" 来删除它们,它删除了 inputText 字段而不是标签。我在播放框架网站上没有找到对此的解释:https://www.playframework.com/documentation/2.0.4/JavaFormHelpers
有没有办法通过内置工具实现这一点,还是有其他可能性?
@import helper._
@import helper.twitterBootstrap._
@helper.form(action = routes.Application.sendQuestion()){
<fieldset>
@helper.inputText(questionForm("questionID"),'style -> "display: none")
@helper.inputText(questionForm("questionText"))
@helper.inputText(questionForm("voteScore"))
@helper.inputText(questionForm("ownerID"))
@helper.inputText(questionForm("page"))
</fieldset>
<input type="submit" class="btn btn-default">
}
【问题讨论】:
标签: java forms playframework