Questions tagged [yii2-widget]

The Yii2-widgets are based upon the \yii\base\Widget class. You can use this tag if your question is about the base-class itself or one of its descendants.

The basic usage of widgets is described here.

30 questions
3
votes
0 answers

Yii2: Strategy for avoiding InputWidget id conflicts

When rendering an InputWidget in Yii2 an id options HTML tag is automatically generated based on an internal static widget instance counter. By default the ids will look like w0, w1, w2, ... depending on how many widgets were instantiated. This…
mae
  • 12,340
  • 8
  • 28
  • 40
3
votes
2 answers

Kartik select2 widget not working in Ajax request in Yii2?

I am using kartik select2 widget in my yii2 basic app. now i have to display province names in select2 widget on ajax call. It is working fine if i put it directly in form. however not working with ajax call. Here are my form fields:
Vinit Singh
  • 1,113
  • 2
  • 21
  • 45
2
votes
1 answer

Yii2 - Data Not Coming To vova07 / yii2-imperavi-widget (textarea)

I've just installed vova07 / yii2-imperavi-widget through php composer.phar require --prefer-dist vova07/yii2-imperavi-widget "*". And, it's working fine for inserting any content to database table. But, I'm in awkward situation when fetching data…
Nana Partykar
  • 10,175
  • 8
  • 43
  • 73
1
vote
1 answer

Yii2 : Create custom menu

I had constructed a bootstrap menu and now I want to reproduce it with Yii2 Nav widget. So, here is the initial state:
1
vote
0 answers

three.js yii2 widget not displaying

Hie. I am trying to develop a simple three.js widget that I can use in my Yii2 project. The intention of creating the widget is to draw wireframes of (Nurbs based) IGES CAD models, for example: This is screenshot of a wireframe displayed by the…
Minathe
  • 636
  • 1
  • 4
  • 18
1
vote
2 answers

Yii2 - moonlandsoft tinymce not working when required

I am using moonlandsoft/yii2-tinymce in my Yii2 project. I am using it according to their documentation. use moonland\tinymce\TinyMCE; echo TinyMCE::widget(['name' => 'text-content']); $form->field($model,…
kishor10d
  • 543
  • 7
  • 19
1
vote
1 answer

Pass dynamic params in the ajax call of yii2-grid EditableColum widget

the \kartik\grid\EditableColumn widget has a parameter called ajaxSettings where you may override the parameters passed with the ajax request to the server. What i want to do is to dynamically pass the selected rows ids together with the value…
silintzir
  • 642
  • 1
  • 6
  • 13
1
vote
1 answer

Yii2-Imagine Widget : Image Resize

I installed Yii2-Imageine for resizing images for wherever I need in my website using php composer.phar require --prefer-dist yiisoft/yii2-imagine "*" command. In this, I can create multiple images of multiple size. Which Is OK. But, what I was…
Nana Partykar
  • 10,175
  • 8
  • 43
  • 73
0
votes
1 answer

Yii2 Menu widget - how to set data-submenu-title for yii2 menu widget

I currently have a menu widget having following items this is item#1 $menuIteams[] = [ 'label' => 'Vouchers', 'url' => '#', 'template' => '
Sourabh Shah
  • 100
  • 11
0
votes
0 answers

Is it possible to add another column to DetailView widget in YII2?

I have a detailview table and i'd like to add another column but not sure how. At the moment it only has sort of 2 columns; one with the attribute label, and the other one with the actual data.
0
votes
0 answers

How to add new values to multiple Select2 from Kartik instead of replace old ones?

I use Select2 widget in multiply mode in YII2 framework. "kartik-v/yii2-widget-select2": "@dev" - this one I have downloaded via composer. kartik-v/yii2-widget-select2 dev-master dd09e46 I added initial values with ajax on widget init…
0
votes
1 answer

Yii2 Progress Bar in a DetailView

I have a requirement of displaying the Progress Bar in DetailView widget. I searched for it but I got solutions for GridView widget. So that I tried modifying it but didn't work as expected. $model, …
0
votes
2 answers

Set active item automatically

I have a menu in my app: Html::img('@web/images/logo-top.png', ['id' => 'logo']), 'brandUrl' => Yii::$app->homeUrl, 'options' => [ 'class' => 'navbar-inverse navbar-static-top', …
GHopper
  • 301
  • 2
  • 12
0
votes
0 answers

Trouble with assets of widget inside another widget Yii2

I try to render widget into another widget and I have trouble with assets. class MyWidget extends Widget { public function run() { $form = ActiveForm::begin(); ActiveForm::end(); } } In browser console i have…
verybadbug
  • 829
  • 1
  • 9
  • 15
0
votes
0 answers

Yii2 Menu widget disable parent item link

How can I disable only the parent item link and leave its children clickable ? For example - when I click on my parent it should open the submenu and not redirect to somewhere else. And if I click on children it should redirect me. P.S I red the…
Toma Tomov
  • 1,241
  • 10
  • 35
1
2