by prettyscripts on 2012-01-24 14:28:00 • Leave a comment »
php • yii
setting a default date value to a date picker field is not so straightforward. as in, simply set a property for the CJuiDatePicker widget.
there are 2 ways to do it. these are based on some forum posts i found a while ago.
method 1 - give the attribut…
more »Tags: date, default, php, yii
by prettyscripts on 2012-01-20 14:17:00 • Leave a comment »
php • yii
i have previously written a post on the same topic with CAutoComplete. since CAutoComplete is depreciated (since V113) and replaced with CJuiAutoComplete, i should keep my notes up-to-dated.
i find that this is easier to implement. i found a solution b…
more »Tags: ajax, autocomplete, jquery, php, yii
by prettyscripts on 2012-01-18 10:52:00 • Leave a comment »
php • yii
this is an updated post in reference to a previous post about saving a field to null when no value is entered. thanks to those who left comment, this is the correct (and easier!) way to do it.
add a new rule to the model:
protected funcion rules() {…
more »Tags: code, null, php, save, yii
by prettyscripts on 2011-10-25 12:36:00 • Leave a comment »
php • yii
i have pages of result and want to default the view to last page and found the solution here.
in controller action function,
more »Tags: grid, last, list, page, yii
by prettyscripts on 2011-10-24 16:02:00 • 1 comment »
php • xajax • yii
i keep running into the same problem. there are at least 2 rows of data saved everytime a form is saved.
it's because of ajax validation!
if you're using CActiveForm and set enableAjaxValidation to true, when the form is submitted, it will be posting…
more »Tags: duplicate, form, submit, yii