Hi i am getting Call to a member function getParameter() on a non-
object on code below..Plz help

public function executeTestform()
{
}

public function executeSend()
{
}
public function validateSend($request)
{
  $name = $request->getParameter('name');

  // The name field is required
  if (!$name)
  {
    $this->getRequest()->setError('name', 'The name field cannot be
left blank');

    return false;
  }

  // The name field must be a text entry between 2 and 100 characters
  $myValidator = new sfStringValidator($this->getContext(), array(
    'min'       => 2,
    'min_error' => 'This name is too short (2 characters minimum)',
    'max'       => 100,
    'max_error' => 'This name is too long. (100 characters maximum)',
  ));
  if (!$myValidator->execute($name, $error))
  {
    return false;
  }

  return true;
}


//In template testformSuccess.php

<?php echo form_tag('home/send') ?>
  Name:    <?php echo input_tag('name') ?><br />
  Email:   <?php echo input_tag('email') ?><br />
  Age:     <?php echo input_tag('age') ?><br />
  Message: <?php echo textarea_tag('message') ?><br />
  <?php echo submit_tag() ?>
</form>




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" 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/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to