Wiki

Sorted by ratingX
Displaying 51-60 of 719 result(s).

Drills : Search by a HAS_MANY relation in Yii 1.1

Created 2 years ago by softarkTutorials12 comments – viewed 28,912 times – ( +30 ) – version 1.1
Sometimes we get lost trying to search by a HAS_MANY relation using CActiveRecord or CActiveDataProvider in Yii 1.1. This article is a series of drills that try to describe the practical techniques of searching by a HAS_MANY relation.

Model validation for field ranges using yii2-field-range extension

Created 7 months ago by Kartik VTips0 comments – viewed 3,072 times – ( +30 ) – version 2.0
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.

Relational data fields display and edit with the yii2-detail-view extension

Created 7 months ago by Kartik VTutorials0 comments – viewed 4,774 times – ( +30 ) – version 2.0
If you have read this wiki you would be aware of the yii2-detail-view extension and how it offers you an easy way to EDIT and VIEW your model data, toggle these modes, and other features. You can read the extension documentation and/or view a demo of this extension, to understand usage.

Understanding Scenarios

Created 3 years ago by Luke JurgsTutorials11 comments – viewed 83,807 times – ( +29 ) – version 1.1
Scenarios are an extremely useful tool for separating validation tasks on any class you use derived from CModel. In this tutorial we will use CActiveRecord.

Code style

Created 4 years ago by zaccariaTips2 comments – viewed 14,109 times – ( +29 ) – version 1.1
Often, when writing widgets or editing Yii code, it is unclear whether or not the code is following the MVC pattern.
tags: mvc

Enforcing "You must agree" requirements in forms

Created 3 years ago by Steve FriedlHow-tos3 comments – viewed 16,937 times – ( +29 ) – version 1.1
Checkboxes have two possible values, true and false, but some applications require that the user select one particular value before proceeding. Examples might be:
tags: validation

Understanding Autoloading, Helper Classes and Helper Functions

Created 3 years ago by Steve FriedlTutorials4 comments – viewed 71,392 times – ( +29 ) – version 1.1
Many Yii users ask how to create helper classes and functions, and though there are numerous approaches spread out among the forum and wiki articles, this Tutorial tries to bring it all together in one place.

Save and Display Date/Time Fields in different formats in Yii2

Created 7 months ago by Kartik VHow-tos10 comments – viewed 10,105 times – ( +29 ) – version 2.0
You would find having such a need in most Yii Projects. Your database needs a specific format to store date fields, while you may want to display it in different formats to the users on forms and other views.

Editing, Deleting, and Viewing model data with the yii2-detail-view extension

Created 7 months ago by Kartik VTutorials0 comments – viewed 6,402 times – ( +29 ) – version 2.0
The yii2-detail-view extension offers you an easy way to EDIT and VIEW your model data, toggle these modes, and adds other features. You can read the extension documentation and/or view a demo of this extension, to understand usage.

Nested inline active fields inside Bootstrap horizontal forms

Created 6 months ago by Kartik VHow-tos2 comments – viewed 7,401 times – ( +29 ) – 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.