There are two ways to do that. The first is to set each attribute independently, like this:
"name=amount" #> SHtml.onSubmit(value => asInt(value).foreach(amount = _)) &
"name=amount [value]" #> amount
The other would be to use a Lift component to replace the whole input. Something like:
"name=amount" #> SHtml.text(amount, value => asInt(value).foreach(amount = _))
The difference between the two approaches is that in the first, you are only adding specific attributes to the element in your template. In the second, you are replacing the entire element with an input type="text"
created by Lift.