Miles,

Here is my helper class state_list.php:

class StateListHelper extends FormHelper {

  var $helpers = array('Form');

  function select($fieldname, $label, $default="  ", $attributes =
null) {
    $list = '<div class="input">';
    $list .= $this->Form->label($label);
    $list .= $this->Form->select($fieldname ,array(
    'AL'=>"Alabama",
    //removed other states
    'WY'=>"Wyoming"), $default, $attributes);
    $list .= '</div>';
    return $this->output($list);
  }
}

I then refer to the Helper in the controller:

class JobsController extends AppController {

  var $name = 'Jobs';
  var $helpers = array('Html', 'Form', 'StateList');
  // removed code from here
}

But I still receive this message:

Missing Helper Class
Error: The helper class StateListHelper can not be found or does not
exist.

Error: Create the class below in file: hayagroup\views\helpers
\state_list.php

<?php
class StateListHelper extends AppHelper {

}
?>



On Apr 16, 4:33 pm, Miles J <[email protected]> wrote:
> Are you calling the class right?
>
> class StateListHelper extends...

--~--~---------~--~----~------------~-------~--~----~
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