Add method to build query forms