Email confirmation of submitted form AND how the form can generate a unique reference number for a reference field