playframework/Play20 — pull request #132 by johnkpaul (2012-02-18 23:30:12+00:00)
Title: Change HelloWorld sample app - allow repeat to take default value matching placeholder from template

The placeholder attribute in the template for the value of the "repeat" option is 10, yet I was unable to submit with that value as empty. Originally I was expecting it to take the value of 10, and I was looking through the code to figure out how that default was set. After I tried it, I was surprised to find out that it didn't take 10 as the default value at all and the form validation failed if it was empty. I just modified this to show how to setup a default value that matches the placeholder on the front end.

If this isn't the direction that you want to go with the default option in this sample application, then maybe I could change the placeholder text to not be an integer, but rather leave it empty or add explanatory text.