Wiki

Sorted by date (updated)X
Displaying 21-30 of 785 result(s).

How to create/update a model with its related items using Listbox or CheckboxList

Updated 9 months ago by softarkTutorials1 comment – viewed 13,957 times – ( +4 / -1 ) – version 2.0
Assume we have many categories and many posts.

How to "masquerade" a non-required form element as 'required' one (in the view only)

Updated 9 months ago by mrunHow-tos2 comments – viewed 15,585 times – ( +7 / -2 ) – version 1.1
In a nutshell, the task at hand is to mark (or render) a model attribute in the typical "_form.php" view file with the 'required' red asterisk while this attribute is not marked as required in the model's rule() method. If you're interested only in the solution, jump ahead to the 'solution' section below.

Interactive mode command-line command for Yii1

Updated 10 months ago by TrejderHow-tos0 comments – viewed 7,127 times – ( -1 ) – version 1.1
For one of my projects I needed an interactive console command in Yii 1, i.e. the one that is gathering all information from user in an interactive mode (a serie of questions and answers displayed directly in the console), ignoring command-line arguments at all.

REST API and null values in XML

Updated 10 months ago by marko60Tips0 comments – viewed 7,736 times – ( -1 ) – version 2.0
I have been working on a REST API using the excellent tools provided by Yii2. My problem was that I have to differentiate between empty values and null values. In other words, <elem></elem> is different from null as it represents an empty string. Also, although some use <elem/> to represent a null value it should still be interpreted as an empty string. In other cases, the absence of the element is taken to represent a null value, but this may create problem with some parsers.
tags: REST, XML, null

Optimize Scenarios for yii2

Updated 10 months ago by AndroideLPTutorials0 comments – viewed 8,470 times – ( +1 / -1 ) – version 2.0
Working with scenarios, with models that can receive many modifications in their rules or structures as development evolves, can create disruptions in the rescue process.

Yii2 GridView Sorting and Searching with a Junction Table Column(Many to Many Relationship)

Updated 10 months ago by Amjad KhanTutorials3 comments – viewed 16,818 times – ( +4 / -1 ) – version 2.0
Following is the table structure

How to customize your grid columns visible and order by user themselves

Updated 11 months ago by Scott_HuangHow-tos0 comments – viewed 5,600 times – ( +1 / -1 ) – version 1.1
Cusomized your grid columns by user themselves, allow user to hide/show columns or re-order the columns sequences.

How to make bootstrap tabs remain active/selected after navigating to different web pages.

Updated 11 months ago by emraldTutorials4 comments – viewed 4,953 times – ( -1 ) – version 2.0
Bootstrap tabs gets unselected/inactive when user navigates to other page and comes back. How to make bootstrap tabs remain active/selected after navigating to different web pages.

"safe" and "unsafe" Model validators (massive assignments)

Updated about a year ago by brianvuHow-tos4 comments – viewed 22,424 times – ( +4 / -7 ) – version 1.1
Ok, it is a little bit difficult to full understanding the unsafe validator.

How to create a criteria condition for a multiple value text search i.e a "LIKE IN"

Updated about a year ago by tophHow-tos2 comments – viewed 36,827 times – ( +1 / -2 ) – version 1.1
This is a shortcut for adding a text search for multiple values i.e.