Refactor TbFormInputElement.php a bit