I am about to develop a form that needs to submit data for each field on the blur event. At which point it is validated, entered into the DB, or a validation error displayed. Whilst the ajax request is happening there needs to be a processing icon next to the field in question.
I can’t see an easy way to do this.
I could use the ajaxvalidation option, but I can’t see how to attach the processing icons. Also, there is no way to identify which field is being validated within Yii - it posts back the whole form.
I could pass the form fields back in an ajax request, but then I have to manually build the whole thing.
Am I missing something? How would you go about it?
My initial concern regarding your issue is that you want to validate a single element from a form and insert into the database. In most cases, your rules will preclude you from creating an AR record without more complete data. Does each field represent a complete AR record?
Edit to add:
I can just create a blank model. Adjust that one field and validate.
In Yii CHtml dosen`t support jquery to change delegate(event … , couse default is delegate(‘click’ or delegate(‘change’ so i made fiew core fixes to solve this problem , so i made a core fix just type Jevent=‘blur’ in $htmlOptions if Jevent is not set it will be default set value