Components for the PHP-based yii framework
Questions tagged [yii-widgets]
64 questions
2
votes
1 answer
Add a value label in Zii progress bar
can I add a value label for a Zii progress bar?
$w =intval($model->fixed);
$this->widget('zii.widgets.jui.CJuiProgressBar', array(
'value'=> $w ,
'htmlOptions'=>array(
…

Saeed
- 21
- 3
2
votes
1 answer
Creating widget as an extension in Yii
I am very new to YII and its extensions... i am trying to create the basic login widget as an extension so that i can reuse it....
the following thinks i have done.
Create a widget view in extensions/widget/login/views/hloginForm.php with this…

Jothi Sankar N Kanakavel
- 733
- 7
- 24
2
votes
3 answers
Yii CWidget - Dependent Dropdown
I am trying to create a widget with a dependent dropdown box.
Following tutorial: http://www.yiiframework.com/wiki/24, I am faced with the following problem with the ajax part:
echo CHtml::dropDownList('metal_id', 'id', $metals, array(
'ajax' =>…

Gravy
- 12,264
- 26
- 124
- 193
1
vote
0 answers
ActiveForm.js error when using dynamic form
I want use dynamic form widget (Demo 2:file upload)
URL:http://wbraganca.com/yii2extensions/dynamicform-demo2/source-code
Every thing is good but when i prees 'minus' button or 'new' button i recieve this error from ActiveForm.js:
TypeError:…

Amin Shafiee
- 405
- 1
- 9
- 21
1
vote
1 answer
yii2 how to make a 1:1:1 relationship sortable and searchable in GridView
Given the 3 entities attendee, event, location, where every attendee hasOne event and every event hasOne location - How do I show a sortable and searchable name of location column in the GridView of attendee?
Schema
CREATE TABLE `attendee` (
`id`…

Mathias
- 334
- 3
- 5
- 22
1
vote
1 answer
Send serialize data on kartik file input
I am implementing \kartik\file\FileInput widget.
Here is my code:
'dataSiswa',
'options' => [
'multiple' => false
],
…

Maulana Yusuf
- 337
- 2
- 4
- 16
1
vote
1 answer
Yii2, set default value for select2 widget
use kartik\widgets\Select2;
echo Select2::widget([
'model' => $myModel,
'name' => 'company[]',
'options' => [
'placeholder' => 'Select a company ...',
'multiple' => true,
],
'value' => 6, //doesn't work
…

Nerd
- 121
- 1
- 10
1
vote
1 answer
Yii widget reload via ajax
I need to reload a content of my Yii widget via AJAX every XX seconds.
This is my widget code:
class UserOnlineWidget extends CWidget
{
public function init(){
}
public function run(){
$userOnline=User::getOnlineUser();
…

enfix
- 6,680
- 12
- 55
- 80
1
vote
4 answers
YII2 add horizontal scrollbar in gridview
I have a database table with 32 columns and I successfully displayed them in the yii2 gridview. The problem is the 32 columns will not fit in the window. I want to add a horizontal scroll bar at the bottom. How can I do that?
Here is the…

beginner
- 2,024
- 5
- 43
- 76
1
vote
2 answers
Yii 2.0 Widget element options
So I have a widget of listView that displays list of text
echo Menu::widget([
'options' => ['class'=>'nav navbar-nav side-nav'],
'items' => [
['label' =>'Dashboard', ],
…

Karate_Dog
- 1,265
- 5
- 20
- 37
1
vote
0 answers
Yii CJuiSlider is not displayed on the layout page
I'm trying to display a standard Yii widget [CJuiSlider] on the layout page for ranking prices (price "from" and price "to") :
Price
from

pioneer
- 67
- 1
- 5
1
vote
0 answers
How to change emptyText value in Yii Datatables Ajax requests?
I used EdataTable extension in my yii Project. I have customized the yii datatable emptyText value in EDataTable.php file. I used dynamic error message when data empty. but this message not reflected in ajax requests.
I initialized Yii datatable…

Mj.
- 321
- 1
- 6
- 13
1
vote
2 answers
uncaught exception: [CKEDITOR.resourceManager.load] Resource name "default" was not found
I have installed CKEditor widget from yii2-ckeditor-widget using composer. Install was successful, there was no error.
Here is my view file:
use dosamigos\ckeditor\CKEditor;
.....
field($model,…

ankitr
- 5,992
- 7
- 47
- 66
1
vote
1 answer
yii extensions: how to access controller which is located inside extension
I am trying to write a custom extension for yii framework and I cannot access controller which is stored in extensions/controllers folder. I have searched a lot but I did not find any hint for that.
This is the structure
protected
--…

johannesMatevosyan
- 1,974
- 2
- 30
- 40
1
vote
1 answer
yiibooster sortable table rows are not working
I have problem with a Yiibooster sortable table rows. It is not working because of two errors.
The file "http://yii-cms.com/protected/extensions/bootstrap/assets/js/jquery.sortable.gridview.js" is not found by the system (404), although the rest…

johannesMatevosyan
- 1,974
- 2
- 30
- 40