. . .

PHP

October 10, 2010

How to customize the error message of a validation rule

The following validation rule uses an error message that is different from the default one class Post extends CActiveRecord { public function rules() { return array( array('title, content', 'required', 'message'=>'Please enter a value for {attribute}.'), // ... other rules ); } }   Source: http://www.yiiframework.com/doc/cookbook/1/
October 9, 2010

DropDown for pageSize in CGridView

A convenient drop down to select page size and save in User state. Step 1: On top of my controller action for the gridview (if you used CRUD, this is actionAdmin() ) i added: // page size drop down changed if (isset($_GET['pageSize'])) { Yii::app()->user->setState('pageSize',(int)$_GET['pageSize']); unset($_GET['pageSize']); // would interfere with pager and […]

  • Cost Efficient Solutions.
  • Minimal Timelines.
  • Effective Communication.
  • High Quality Standards.
  • Lifetime Support.
  • Transparent Execution.
  • 24/7 Availability.
  • Scalable Teams.

Join Our 200+ Happy Clients Across Globe


Free Consultation.

    Do you need tech help of your startup/business? Experts from our team will get in touch with you.

    Please do not post jobs/internships inquiries here.