code: def handle_submit(self):
          
          form = self.request.form
          # Selected service UIDs
          uids = form.get("uids")
          # reference sample -> selected services mapping
          supported_services = form.get("SupportedServices")
          # service -> position mapping
          positions = form.get("Position")[0]
          for uid in uids:
              position = positions.get(uid)
              if position == "new":
                  position = None
              service_uids = supported_services.get(uid)
              referencesample = api.get_object_by_uid(uid)
              self.context.addReferenceAnalyses(
                  referencesample, service_uids, slot=position)
          redirect_url = "{}/{}".format(
              api.get_url(self.context), "manage_results")
          self.request.response.redirect(redirect_url)
docs: Handle form submission