Wiki

Articles tagged with "widget", sorted by date (updated)X
Displaying 1-9 of 9 result(s).

Managing your nested dropdown dependency with DepDrop widget

Updated 2 months ago by Kartik VTutorials2 comments – viewed 1,717 times – ( +25 / -5 ) – version 2.0
If you are coming over to Yii 2 from Yii 1.x, you may have already read this useful wiki for creating dependent dropdowns. You can use a similar approach in Yii 2 to do the same. But if you are looking at a prebuilt solution that helps you manage it easier, read along.

How to store array/widget configuration to the database with config validation rules

Updated 2 months ago by Kartik VTutorials0 comments – viewed 1,174 times – ( +26 / -4 ) – version 2.0
You may have scenarios, where you want to store a specific array configuration to the database. A classic example could be saving Yii widget configuration to the database and then retrieving it at runtime, with dynamic parameters set. This wiki discusses one of the approaches to do this. Let's consider you have something like the NavBar configuration below to store in the db:

Managing a star rating with the StarRating widget in Yii 2

Updated 2 months ago by Kartik VHow-tos1 comment – viewed 1,162 times – ( +25 / -5 ) – version 2.0
In Yii 1.x, there was a built in widget CStarRating based on the jquery star rating plugin. There exists no prebuilt solution in Yii2, however the same concepts can be extended using any jquery plugin.

How to read HTML5 Multiple File Input from controller?

Updated 2 months ago by Kartik VHow-tos1 comment – viewed 964 times – ( +24 / -4 ) – version all
Ok, so you have a HTML 5 file input markup on your view and you have enabled multiple attribute to true. You may also be using widgets based on HTML5 input like \kartik\widgets\FileInput. But when you read a file in Yii controller using CUploadedFile (Yii1) or UploadedFile (Yii2), you do not see a list of multiple files that you selected in your view, but only one row. Your HTML markup in your view would be something like this and you don't know why this is not working?

How to use GridView with AJAX

Updated 2 months ago by Antonio RamirezHow-tos0 comments – viewed 2,726 times – ( +2 ) – version 2.0
With the adoption of PJax on Yii2 things  have change quite a bit with GridView when it comes to work with them in AJAX mode. It will probably be confusing at the beginning, but then you will soon realize how powerful the new approach is.
tags: yii2, pjax, widget

Additional form data with XUpload

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

Extending CJuiDialog

Updated about a year ago by Maurizio Domba CerinHow-tos0 comments – viewed 8,182 times – ( +2 / -2 ) – version 1.1
Sometimes you have CJuiDialog with different content but same buttons (or width, height). If you don't want to repeat yourself this is a great solution:

SEO-conform Multilingual URLs + Language Selector Widget (i18n)

Updated 2 years ago by c@cbaTutorials35 comments – viewed 37,995 times – ( +29 ) – version 1.1
You have a multilingual application, and you want the URL of a page to be different for different languages, to account for SEO. The URL for the contact page for example should look like http://something.com/en/contact in english, and http://something.com/de/contact in german. This tutorial describes how to make it happen. Note that currently selected language is always a part of the URL, and thus available to the application through $_GET. You don't have to use sessions variables to keep track of the language if you don't want to.

How to create nice modal login widget with a CJuiDialog

Updated 3 years ago by Maurizio Domba CerinTutorials3 comments – viewed 40,681 times – ( +9 ) – version 1.1
...folder /protected/components/UserLoginWidget.php... ...extending the CWidget class...
tags: user, login, modal, widget