Move customer search logic from view to form