Call to a member function create() on a non-object
-
I have a MembersController like this:
class MembersController extends MvcPublicController {
public function signup() {
$this->set_object();
}}
And I have a view for signup like this:
<h2>Membership Signup</h2>
<?php echo $this->form->create($model->name); ?>
<?php echo $this->form->input(‘first_name’); ?>
<?php echo $this->form->input(‘last_name’); ?>
<?php echo $this->form->end(‘Add’); ?>The view gives me an error:
Fatal error: Call to a member function create() on a non-object in /mysite.com/wp-content/plugins/member-registration/app/views/members/signup.php on line 2
Why does $this in that context not have the form helpers?
The topic ‘Call to a member function create() on a non-object’ is closed to new replies.