@bschussek I really don't like this switch statement as soon it will grow too much. I mapped here all the attributes of input type in html5 forms: https://docs.google.com/a/spa.it/spreadsheet/ccc?key=0Ar4vhSdcR0yqdFcxYmlid21GSzN6dHpkX1ZCc3Nrd2c#gid=0
Do you have any suggestion on how to approach this method?