improve form api to include dom
improve form handling for select groups; improve type handling in json