There is a simplified way for creating a popit instance
Creating a form for advanced update in a writeit instance
Adding a form in the user section for advanced writeit instance administration