you can have multiple submit buttons within one form. Just make your tabs out of styled buttons.
why would you want to do this? 1. the button is also a form field that would identify the tab to load which could be useful 2. accessability - users who have to access your application via browsers that don't support javascript could still use your multistep form because each button submits the form without having to rely on javascript to submit it for you. Bill On 12/11/05, Nando <[EMAIL PROTECTED]> wrote: > > Yes, perhaps i could do that ... i just had a lingering question in my mind > "who" should know which step has been validated and which hasn't. No > candidate stood out in the current model, it didn't seem right for the bean > itself to know "which step i'm on" (or am i wrong there?), and the cascading > solution kind of just fell into place. So for the moment, that's what i've > got. > > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of > Dawson, Michael > Sent: Sunday, December 11, 2005 3:03 PM > To: [email protected] > Subject: RE: [CFCDev] How to pass a bean from page to page > > > Rather than have your code "cascade" in reverse multiple times, why not set > a flag each time a form page is successfully validated? > > Then, all you need to do is find the latest tab that was validated and then > jump right there. > > M!ke > > ________________________________ > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf > Of Nando > Sent: Saturday, December 10, 2005 11:22 PM > To: [email protected] > Subject: RE: [CFCDev] How to pass a bean from page to page > > > > Mike, > > I'm just working on a multistep form now. > > On the wizard question, what about instantiating your bean into session > scope? That's what i'm doing. > > On the Next=> button / multi step process with tabs, here's what i'm doing. > > First for me was to recognize that the tab navigation allows users to go > anywhere they want in the process. The Next=> button only allows forward > movement to the next step. So they are different. > > Second was to place a method in my bean that allows me to set the required > fields at each step. > > Third is to validate each step coming into it to make sure the required > fields are set and valid in the bean. If it's not valid, the user is > redirected back one step - and the required fields for that step are reset, > validation is run, and if it's still not valid, the user is redirected back > another step, the required fields are reset, validation method run ... etc. > So in other words, if a user starts on step 1 and clicks the tab to step 5 > without filling anything in, the validation cascades backwards and they land > back on step 1 with the required fields highlighted in red (for instance). > > A wee bit processing intensive to cascade the validation like that, but it > won't happen so often. So it's ok by me. > > Now, all that's left is to figure out how to submit the form when you click > the next tab instead of clicking the Next=> button. If a user clicks any > other tab besides the next tab in the sequence, they are just navigating and > not really submitting. Sounds like a simple conditional on the tab that says > essentially, "if i'm the next step, then i'll insert an > onClick="this.form.submit()" in my <a href /> tag. > > I'll give that a try - i didn't quite figure that part out yet. > > > ciao, > Nando > > PS - whenever there's a form submission in the process, the required fields > are reset, which means that the required fields for a submission at step 2 > are the same as the required fields to enter into step 3. > ---------------------------------------------------------- > You are subscribed to cfcdev. To unsubscribe, send an email to > [email protected] with the words 'unsubscribe cfcdev' as the subject of the > email. > > CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting > (www.cfxhosting.com). > > An archive of the CFCDev list is available at > www.mail-archive.com/[email protected] > ---------------------------------------------------------- > You are subscribed to cfcdev. To unsubscribe, send an email to > [email protected] with the words 'unsubscribe cfcdev' as the subject of the > email. > > CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting > (www.cfxhosting.com). > > An archive of the CFCDev list is available at > www.mail-archive.com/[email protected] -- [EMAIL PROTECTED] http://blog.rawlinson.us If you want Gmail - just ask. ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
