Welcome Guest, Not a member yet? Register   Sign In
moving through a form based app
#2

[eluser]Michael Wales[/eluser]
I'm doing something very similar - 25 questions, one question per page. I am using a session to store the user's answer to each question (one variable, comma-delimited) - if your users are registered members, you could just use a database instead.

A quick run-down:
1. User visits /poll to read instructions, clicks next (link to /poll/1).
2. On /poll/1 they answer the question - this form's method is itself (/poll/1).
3. Upon submission /poll/1 is reloaded - the field is validated, if good - add the session stuff and redirect to /poll/2. If it's not good - they just get to try again.

The links /poll/2 are actually a remapped Controller - going to a questions method and using the # as the ID for the questions to pull from the database.


Messages In This Thread
moving through a form based app - by El Forum - 07-25-2007, 07:13 PM
moving through a form based app - by El Forum - 07-31-2007, 10:27 AM



Theme © iAndrew 2016 - Forum software by © MyBB