In this wiki I will show how could use a TbActiveForm for changing the old password with help of old, new and repeat password features.
In this wiki I will show how could use a TbActiveForm for changing the old password with help of old, new and repeat password features.
A time ago i've met the issue that Yii doesn't run any client-side form validation when submitting the form by CHtml::ajaxSubmitButton. The small javascript below helps to fix it.
The only thing required is simple, we just need to create a view that will be partially rendered by a call to a controller (using renderPartial) and make sure that we process output -setting to true the parameter on the function. Everything will work as expected but...
With Yii you can use one CActiveForm for collecting data for two or more models with ajax validation and client validation.
In this simple example I'll demonstrate how to extend CActiveForm class to overload some drawing functions to achieve some commonly used fixes in forms.
Here is overloaded version of CActiveForm.labelEx that adds colon (:) at the end of text of label with respecting CHtml::$afterRequiredLabel and CHtml::$beforeRequiredLabel