Added helper method for generating nested forms