refactoring of the toggle functions.
Fixes getValue function.
Changed the way of toggle change the UI, now by default the fields are
visible, and the toggle propertie is used to hide the fields.