How to capture location in location field?