2012-03-24 55 views
4

在玩2.0的模板,也有一些助手來構建表單輸入:@inputText@inputPasswordPlayframework:幫助者生成HTML5輸入(type =「email」或type =「url」)?

利用已有的幫手,我沒有找到一個方法來構建HTML5輸入這樣的:

<input type="email" ... /> 
<input type="url" ... /> 

我需要做我自己的助手,還是我想念什麼?

+1

這部戲2插件應該做的正是你想要的東西:https://github.com/loicdescotte/Play2-HTML5Tags – Loic 2012-08-26 06:38:26

+0

爲什麼我的答案轉換爲註釋?我認爲它回答了這個問題:「我需要幫助自己嗎?」 – Loic 2012-08-26 18:28:41

回答

4

似乎some one已經在2.0.4中修復了這個問題。現在,你可以這樣做:

@inputText(
    myform("email"), 
    '_showConstraints -> false, 
    '_label -> Messages("label.email"), 
    'type -> "email" 
) 
相關問題