code: def prepare_place_layer(self):
          
          if os.path.exists(self.input_place.text()):
              self.place_layer = QgsVectorLayer(
                  self.input_place.text(),
                  tr('Nearby Cities'),
                  'ogr'
              )
              if self.place_layer.isValid():
                  LOGGER.debug('Get field information')
                  self.name_field.setLayer(self.place_layer)
                  self.population_field.setLayer(self.place_layer)
              else:
                  LOGGER.debug('failed to set name field')
docs: Action when input place layer name is changed.