I have a form which has a input text field bound to an attribute:
@helper.inputText(myForm("username"))
But I wish to avoid helpers for the input field. I want to bind the input text field directly with the attribute in the model, something like:
<input type="text" value=@myForm("username")>
Any pointers on how to do this?
@myForm("username")returns a Field object. So you can access its variables. In your case you want to fill the value of a input field. So you call itsvaluevariable:<input type="text" value=@myForm("username").value>. You can access its error(s), contraint(s), format(s) e.g. in the same way.