title: Yii - Wizard Behavior extension - Skipping Steps
body: <p>I hope someone on stackoverflow has some experience with the Wizard Behavior extension: <a href="http://www.yiiframework.com/extension/wizard-behavior/" rel="nofollow">http://www.yiiframework.com/extension/wizard-behavior/</a></p>
  
  <p>The problem is that when I click submit on the first page (user), it goes all the way to the billing page and skips the company page...help?</p>
  
  <p>I have 3 steps to collect information: a user, company and billing page.  Here is my behaviors function in my controller:</p>
  
  <pre><code>public function behaviors() {
      return array(
       'wizard'=&gt;array(
        'class'=&gt;'ext.WizardBehavior.WizardBehavior',
        'steps'=&gt;array(
         'user','company','billing'
        )
       )
      )
  }
  </code></pre>
  
  <p>This is my process step function:</p>
  
  <pre><code>public function wizardProcessStep($event) {
      $name = '_wizard'.ucfirst($event-&gt;step);
      if (method_exists($this, $name)) {
          call_user_func(array($this,$name), $event);
      } else {
          throw new CException(Yii::t('yii','{class} does not have a method named "{name}"', array('{class}'=&gt;get_class($this), '{name}'=&gt;$name)));
      }
  }
  </code></pre>
  
  <p>Here is my company step as an example:</p>
  
  <pre><code>protected function _wizardCompany($event) {
      echo 'called company';
      exit();
      $company=new Company;
      if(isset($_POST['Company'])) {
          $company-&gt;attributes=$_POST['Company'];
          if($company-&gt;validate()) {
              $event-&gt;sender-&gt;save($company-&gt;attributes);
              $event-&gt;handled = true;
          }
      }
      $this-&gt;render('new_company',array(
          'company'=&gt;$company,
          'event'=&gt;$event,
      ));
  }
  </code></pre>