HI All,

I have done with Registration form.

I want to check duplicate. for this, I have done like:

Actions.class.php

//check for duplicate username
 $c_checkduplicate = new Criteria();
 $c_checkduplicate->add(sfGuardUserPeer::USERNAME, $this->email);
 $isduplicate = sfGuardUserPeer::doSelect($c_checkduplicate);

 if(count($isduplicate) >0)
 {
  //user is duplicate show error message.

  $this->getRequest()->setError('email',"The username is already taken.
Please enter a different username.");
        $error = true;
       return sfView::SUCCESS;
 }


But now, my problem is how to show this error in template.

B'coz when I write

indexSuccess.php

<?php echo form_error('email') ?>


It displays error


*Fatal error*: Call to undefined function form_error() in *
C:\xampp\htdocs\td\apps\guest\modules\signup\templates\indexSuccess.php* on
line *18*
**
**
I added
**
use_helper('Validation');


Now it is showing error


 Call to undefined method sfWebRequest::hasError.



Wht is wrong with me???

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to