Added rowtype documents form and function