Skip to main content
Participating Frequently
March 17, 2010
Question

Dynamically number multi-page survey

  • March 17, 2010
  • 1 reply
  • 296 views

Hi

I'm trying to create a multiple-page questionnaire with routing, so want to dynamicallly number the questions so it goes up in steps of 1 for the user no matter which route they use. I've got as far as <cfset session.qnumber=#session.qnumber#+1> but that does not work if you use the 'back' button.

Is there a good way to do this, please?

many thanks

Dave

This topic has been closed for replies.

1 reply

Fernis
Inspiring
March 18, 2010

You could store the last question number in the page in a hidden form field.

When user presses "next", the next page knows the last question number - just add 1 to it.

You don't need a session variable for this.

--

-Fernis - fernis.net - ColdFusion Developer For Hire