docs: def form_valid(self,form):
          '''
          Even if this form is valid, the handlers for this form may have added messages
          to the request.  In that case, then the page should be handled as if the form
          were invalid.  Otherwise, update the session data with the form data and then
          move to the next view
          '''
          reg = self.temporaryRegistration
  
          # The session expires after a period of inactivity that is specified in preferences.
          expiry = timezone.now() + timedelta(minutes=getConstant('registration__sessionExpiryMinutes'))
          self.request.session[REG_VALIDATION_STR]["temporaryRegistrationExpiry"] = \
              expiry.strftime('%Y-%m-%dT%H:%M:%S%z')
          self.request.session.modified = True
  
          # Update the expiration date for this registration, and pass in the data from
          # this form.
          reg.expirationDate = expiry
          reg.firstName = form.cleaned_data.pop('firstName')
          reg.lastName = form.cleaned_data.pop('lastName')
          reg.email = form.cleaned_data.pop('email')
          reg.phone = form.cleaned_data.pop('phone', None)
          reg.student = form.cleaned_data.pop('student',False)
          reg.comments = form.cleaned_data.pop('comments',None)
          reg.howHeardAboutUs = form.cleaned_data.pop('howHeardAboutUs',None)
  
          # Anything else in the form goes to the TemporaryRegistration data.
          reg.data.update(form.cleaned_data)
          reg.save()
  
          # This signal (formerly the post_temporary_registration signal) allows
          # vouchers to be applied temporarily, and it can be used for other tasks
          post_student_info.send(sender=StudentInfoView,registration=reg)
          return HttpResponseRedirect(self.get_success_url())