Need help to generate the following form