{"issue":{"state":"open","pull_request":{"diff_url":"https://github.com/srkirkland/Html5MvcTemplates/pull/4.diff","html_url":"https://github.com/srkirkland/Html5MvcTemplates/pull/4","patch_url":"https://github.com/srkirkland/Html5MvcTemplates/pull/4.patch"},"user":{"avatar_url":"https://secure.gravatar.com/avatar/c3358ee7302e8d1450e82e8d14f3b872?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"c3358ee7302e8d1450e82e8d14f3b872","url":"https://api.github.com/users/paultyng","login":"paultyng","id":422474},"milestone":null,"assignee":null,"updated_at":"2011-11-08T03:00:38Z","labels":[],"comments":8,"closed_at":null,"url":"https://api.github.com/repos/srkirkland/Html5MvcTemplates/issues/4","body":"Now the inputs will render with these attributes when they are specified in metadata:\r\n\r\n    <input class=\"text-box single-line\" id=\"RegularString\" name=\"RegularString\" placeholder=\"Enter your string...\" required=\"required\" type=\"text\" value=\"\">\r\n\r\nNote the additional attributes.  `placeholder` pulls from the `ModelMetadata.Watermark`, `required` pulls from `ModelMetadata.IsRequired`","html_url":"https://github.com/srkirkland/Html5MvcTemplates/issues/4","title":"Add Html 5 Placeholder and Required attribute support to editor templates","number":4,"id":2166772,"created_at":"2011-11-07T20:13:17Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/466131196d77c972353e1fd449dddb30?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"466131196d77c972353e1fd449dddb30","url":"https://api.github.com/users/BoPetersen","login":"BoPetersen","id":1175185},"updated_at":"2011-11-08T03:00:38Z","url":"https://api.github.com/repos/srkirkland/Html5MvcTemplates/issues/comments/2663277","body":"We can just do readonly with:\r\n\r\nif (ViewData.ModelMetadata.IsReadOnly) { values.Add(\"readonly\", \"readonly\"); }\r\n\r\nJust like with required.","id":2663277,"created_at":"2011-11-08T03:00:38Z"}}