Wiki

Articles tagged with "form", sorted by viewsX
Displaying 1-7 of 7 result(s).

Updating fields on a form with Ajax and Json

Created 2 years ago by Russell EnglandHow-tos4 comments – viewed 31,104 times – ( +12 / -1 )
I'm developing a website that has an option to look up a car's registration number via SOAP and return additional details such as make, model, colour etc.

Update two models with one view

Created about a year ago by sensorarioTips10 comments – viewed 18,664 times – ( +10 / -2 )
Suppose to have two models: Users and Emails. You do not want to store email in a Users model. And User can have 0 or many emails. This is the form generated to create a new user (just username).
tags: database, model, view, form

CGridView: Use special variable $data in the htmlOptions of a column (i.e. evaluate htmlOptions attribute)

Created about a year ago by c@cbaTutorials0 comments – viewed 16,298 times – ( +20 / -1 )
    For each column of the CGridView, we can specify name, value, htmlOptions, cssClassExpression etc. In the declarations of the attributes value and cssClassExpression we can use the "special" variable $data, for example like this: 'value'=>'$data->author->username',.     Now we might want to use $data in the declaration of the htmlOptions attribute, which is normally not possible, to generate for example the tag <td id="3" class="name_3">, where 3 is the id of the data model for the current row, i.e. $data->id. That is, we want to be able to use: 'htmlOptions'=>array('id'=>'$data->id', 'class'=>'"name_{$data->id}"')     Here's a way to accomplish this...

CGridView and AjaxForm Connect

Created 2 years ago by PinkBrainPlanHow-tos2 comments – viewed 14,003 times – ( +1 )
As I'm new to the framework (2 weeks) - I tried to build a functionallity I already use a lot in my old framework (PRADO). This means combining a GridView with a form. And this in one page, what allows you to select a record from the grid and view the values in the same page without jumping to a new page.
tags: Ajax, Form, CGridView

Additional form data with XUpload

Created 7 months ago by AsgarothHow-tos5 comments – viewed 10,180 times – ( +5 )
In this article you'll learn how to send additional form data when uploading files using XUpload widget

Extending CActiveForm for some form display fixes and language tweaks

Created 2 years ago by TrejderTips0 comments – viewed 8,500 times – ( +5 )
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.

Show captcha after <N> unsuccessfull attempts

Created 11 months ago by zitterHow-tos6 comments – viewed 7,543 times – ( +14 / -3 )
In this mini howto I would like to show how to add a required captcha field in the login form, after a defined number of unsuccessfull attempts. To do this, I will use the blog demo that you have in default Yii download package (path/to/yii/demos/blog).