Last modified: 2014-02-12 23:38:14 UTC
Created attachment 9091 [details] Support for HTML5 placeholder attribute This enhancement allows Semantic Forms to support the HTML5 "placeholder" attribute on text inputs, text areas, and comboboxes. http://dev.w3.org/html5/spec/Overview.html#the-placeholder-attribute http://diveintohtml5.org/forms.html Usage example: {{{field|monthly unique visitors|placeholder=Ex: this is an example}}} Notes: -The combobox requires a modification in the .js script, and for some reason, the placeholder attribute on this input seems to only work if it's the last attribute defined in the input tag. -The compatible browsers auto-style the placeholder for Semantic Forms'text inputs and text areas, but don't apply any style for the comboboxes. It has to be defined in the CSS. In the current patch I just applied a style for any placeholders, but there is in the comments the specific style for the comboboxes too. -Wiki syntax doesn't work inside the placeholders (but doesn't cause a crash either)
Thanks for this patch! I had no idea about the new "placeholder" attribute - it's awesome. I really need to look more into this HTML5 thing. Anyway, I added in the simple parts - for the text and textarea inputs - but haven't yet added the combobox handling, which requires the Javascript changes.