Improve formatting and fix validation of input elements

Glue the * to required field labels.
Don't use class attribute for validation. Use
data-rule-[date|datetime|url|number] and required attributes instead.
Fixes #1822
Put hidden input fields below the controls they're linked to so that the
validation messages appear below the controls.
Change input type of EMAIL fields to "email".