add hook to form