Questions tagged [yii-widgets]

Components for the PHP-based yii framework

64 questions
0
votes
1 answer

2amigos DataRangePicker. Display over input.

Problem I set orientation, but it's still at the bottom. What's the problem? Code field($contactUsModel, 'planningToTravelFrom') ->widget(\dosamigos\datepicker\DateRangePicker::className(), [ …
D.R.
  • 2,540
  • 3
  • 24
  • 49
0
votes
1 answer

yii 1 CJuiDatePicker inside custom widget

I create new widget like this: class Schedule extends CWidget { public $address = null; public $order = null;//order public function init() { if(isset($this->order)) $this->address = $this->order->address; …
0
votes
0 answers

Trying to get property of non-object in yii widget

I faced with error Trying to get property of non-object The error disappears when I use my own widget. Here is the code of this widget class OtherProductionWidget extends CmsWidget { public $category; public $product; public…
YuriiChmil
  • 441
  • 1
  • 5
  • 18
0
votes
1 answer

I want to display menu items dynamically from database also static in my yii2 frontend

I just want to display menus from database in yii2 advanced template frontend. Also i have static menus. I am using menu widget Here is my code ['class' =>…
Sivabalan
  • 971
  • 2
  • 18
  • 43
0
votes
1 answer

How to save a binary directly to a database table field (JSON data) in Yii?

I'm working on a Yii project with a database, containing a table, where almost all it's data is saved in a field as JSON (it's crazy, but it is so as it is): id INTEGER user_id INTEGER data LONGTEXT This "JSON field" data has following…
automatix
  • 14,018
  • 26
  • 105
  • 230
0
votes
2 answers

Yii Framework Undefined Offset: 0

I am trying to use CGridView with custom query, and trying to build a very simple with no sorting and stuff. My View contains simple CGridView $this->widget('zii.widgets.grid.CGridView', array( 'dataProvider'=>$dataProvider, )); And my…
mdanishs
  • 1,996
  • 8
  • 24
  • 50
0
votes
1 answer

Yii2, what the model parameter does in widget?

echo Select2::widget([ 'model' => $vendorModel, 'attribute' => 'id', 'data' => $vendor, 'options' => ['placeholder' => 'Select a vendor ...'], 'pluginOptions' => [ 'allowClear' => true ], ]); The above Select2 widget…
Nerd
  • 121
  • 1
  • 10
0
votes
3 answers

Yii, CJuiDatePicker how to block certain days of the Month

So I have this widget on my Yii _form.php page. Is it possible to do things like blocking a certain day of the month? Or maybe blocking all the Mondays of the Month, disallowing users to select any Monday. UPDATES based on hamed's answer
NewbieCoder
  • 676
  • 1
  • 9
  • 32
0
votes
1 answer

Placing a widget within Yii's CActiveForm loses CActiveForm functionality

I use CActiveForm::dropdownList() in many, many places. To speed up development I'd like to write a widget that encapsulates all the related work. I have something that displays correctly but loses the validation functionality of CActiveForm.…
ebakunin
  • 3,621
  • 7
  • 30
  • 49
0
votes
0 answers

Creating a new Widget in Yii Framework

I'm creating a Yii widget on a project and I've run into a problem, albeit following all the naming conventions correctly. Got an error include(RecentCommentsWidget.php): failed to open stream: No such file or directory I have included the path…
Richie
  • 1,398
  • 1
  • 19
  • 36
0
votes
1 answer

I am using Select2 Widget In yii Framework and want to call function on change event but its not working

I am using Select2 Widget In yii Framework and want to call function on change event but its not working Yii::import('ext.select2.Select2'); echo Select2::activeMultiSelect($categoryModel, "cat_name", CHtml::listData( …
FahadAkram
  • 445
  • 1
  • 5
  • 25
0
votes
1 answer

Yii CGridView. Show columns from not related tables

Currently I have CGridView with columns from few joined tables, but also I need to add additional columns from other table, and I can not join it with first tables, because there is no relations between them. Second table assessment_rate: id …
DeividasJJ
  • 125
  • 1
  • 13
0
votes
2 answers

cDetailview Display alias name yii

My view code widget('zii.widgets.CDetailView', array( 'data'=>$model, 'attributes'=>array( 'id', 'eventstype', …
Steve Bals
  • 1,949
  • 6
  • 22
  • 32
0
votes
1 answer

ajaxlink in cgridview; Error undefined is not a function in yiigridview.js

I'm receiving the error Uncaught TypeError: undefined is not a function jquery.yiigridview.js I have tried several ways, but I don't think I am doing this correctly. I currently have : $this->widget ( 'bootstrap.widgets.TbGridView', array ( …
hammies
  • 1,344
  • 2
  • 22
  • 46
0
votes
1 answer

Delete operation in CGridView in yii.

I am using CGRidVeiw to list my records from database, In each records I have an edit and delete button.Everthing is working fn9 other than the delete operation,actually its is showing an error after clicking the delete icon,but its still…
saji
  • 201
  • 1
  • 5
  • 19