>
> > You could check for login after creating the form but before processing
> it,
> > and if not logged in, still return the form, with the flash message.
>
>
> I appreciate your guidance and assistance (a website? code examples?)
> to do this. Thank you!
>
Maybe something like this (not tested):
def show_form():
if not auth.is_logged_in():
request.vars = None # remove the submitted variables so no submission
response.flash = 'Session expired'
form = SQLFORM(db.table)
if form.process().accepted:
response.flash = 'Reply Successful'
elif form.errors:
response.flash = 'Reply has errors'
return dict(form=form)
You could get more sophisticated and try to preserve the submitted values
in the returned form. I'll leave that as an exercise.
Anthony