Showing posts with label yii framework. Show all posts
Showing posts with label yii framework. Show all posts

Thursday, April 12, 2012

Make captcha in yii framework

If you want to make captcha in yiiframework you have gone to the right place. I want to teach you about how to make captcha in yiiframework.

You can make captcha in yiiframework easy because yii has featured to make the captchaa easily. So let't take a look how to make the captcha in yiiframework

To make the capctha you have to do :
  • Add the code rules to your controller id. For example UserController. 
  •  public function actions(){
      return array(
        // captcha action renders the CAPTCHA image displayed on the user registration page
        'captcha'=>array(
          'class'=>'CCaptchaAction',
          'backColor'=>0xFFFFFF,
        ),
      );
     }
    

Tuesday, April 3, 2012

Using CJuiAutoComplete in yii framework

In the version 1.1.3 yii CAutoComplete was deprecated, so for better result you should consider using CJuiAutoComplete to make autocomplete in yii framework.

To use this widget is more easy to use but with the multiple selections of CJuiAutoComplete maybe you should have to implements more javascript functions.

Let's take a look how to make CJuiAutoComplete with multiple selection enabled. Assume you have code in the article in views article /protected/views/article/_form.php. And I have table with just only 2 fields : id_tag and name