I have a fair bit using the olders form wizard component (I think
there are two versions floating around now).

Basically each 'step' in the form has two methods associated with it,
a method to display the page and an optional ,ethod to validate that
specific page. If you return false from the second method then the
form wizard will not progress to the next step in the chain.

So, put your validation tests (not the validate array) in the second
method and return either true (this step is ok and we can continue to
the next step) or false (oops there was an error and we need to do
this step over again).

HTH, Ian

On Jul 14, 6:23 pm, Rich Goldman <[EMAIL PROTECTED]> wrote:
> Hi, does anyone have experience using the wizard component? I'm a little
> mystified by the following sample code from the wizard tutorial:
>
> |    function processStepOne() {
>         # do some validation stuff here
>         return true (or false);
>     }
>
> | What does "do some validation stuff here" mean? Should I put my
> validate array in there? But then I have to return true or false at the
> end of the function... I'm confused.
>
> Also, I can't figure out how to access the form validation errors in the
> view. I don't see anything in the manual about how to do this. Can
> someone point me in the right direction?
>
> Thanks!
> Rich
>
> |
>
> |
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to