added generateForm service function to analyse input object