How to generate a unique student number in form?