Refactored view form element factory

Signed-off-by: RedChrome <redchrome@gmx.de>