Add function to set and get values and text of fields detecting automati...

...cally the field types