How can I generate an automated serial no. on registration form?