correcting code for staff profile form plugin