Wiki

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

Updating fields on a form with Ajax and Json

Created 3 years ago by Russell EnglandHow-tos4 comments – viewed 43,891 times – ( +12 / -1 ) – version 1.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.

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

Created 2 years ago by c@cbaTutorials3 comments – viewed 36,088 times – ( +27 / -1 ) – version 1.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...

Update two models with one view

Created 2 years ago by sensorarioTips11 comments – viewed 30,252 times – ( +10 / -2 ) – version 1.1
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

Additional form data with XUpload

Created about a year ago by AsgarothHow-tos7 comments – viewed 23,680 times – ( +8 ) – version 1.1
In this article you'll learn how to send additional form data when uploading files using XUpload widget

CGridView and AjaxForm Connect

Created 3 years ago by PinkBrainPlanHow-tos2 comments – viewed 17,802 times – ( +1 ) – version 1.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

Show captcha after <N> unsuccessfull attempts

Created 2 years ago by zitterHow-tos7 comments – viewed 13,187 times – ( +14 / -4 ) – version 1.1
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).

Extending CActiveForm for some form display fixes and language tweaks

Created 3 years ago by TrejderTips0 comments – viewed 12,437 times – ( +5 ) – version 1.1
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.

Update related models of a model using listBox and checkBoxList in the form

Created 2 months ago by KonApazHow-tos0 comments – viewed 1,740 times – ( +2 ) – version 1.1
Suppose you want to have a list in Category with its related products and you want to updates the list (removing or insert product items) This wiki show us how to do that

Managing different Bootstrap form layouts with yii2-field-range extension.

Created about a month ago by Kartik VHow-tos0 comments – viewed 1,705 times – ( +24 ) – version 2.0
This wiki will explain how you can use the Field range extension with multiple Bootstrap form layouts (vertical or horizontal). You maybe aware, that the yii2-field-range extension enables you to easily setup ActiveField range fields with Bootstrap styling. You basically can setup two attributes joined together like a single field with combined validation error block.

Nested inline active fields inside Bootstrap horizontal forms

Created about a month ago by Kartik VHow-tos1 comment – viewed 1,503 times – ( +25 ) – version 2.0
Are you using the Bootstrap 3 form styles with Yii 2 Active Forms? Have you faced problems in displaying complex layouts which needs you to display multiple inline form fields in a single row, within bootstrap horizontal forms. Then read on.