Nested form and reference number generation created