Questions tagged [yii-chtml]

CHtml is a static class that provides a collection of helper methods for creating HTML views.

CHtml is a static class that provides a collection of helper methods for creating HTML views.

52 questions
0
votes
2 answers

Adding href to CHTML::image

I'm currently using an image in my navbar but I also want to make clicking this return to the home page. I thought adding ,array('href' => 'imagepath.png') would work but had no luck so far and it seems to break the page! this is the code I am…
Alex
  • 673
  • 3
  • 9
  • 22
0
votes
1 answer

Cannot Fill a multiple textfield based dropdownlist Yii

I have a one table, the name table is 'siswa', and has primary Key 'nim' and other field 'nama','alamat','tanggal_lahir' and other. I want to fill all fieldtext base dropdownlist in Yii framework. with my code is shown/updated with one textfield…
Bcktr
  • 208
  • 1
  • 8
  • 22
0
votes
2 answers

Updating two separate Models from one Form Submit in yii

I have a chtml::textfield and what I need is whenever I input a value and click on the chtml::button, it should update two different models. but I don't know how process the $_POST['id'] in the controller.
shychotc
  • 25
  • 7
0
votes
4 answers

yii Forms returns error, parameter is not defined

I have Settings controller like public function actionIndex() { $model = new SettingsForm; if(isset($_POST['SettingsForm'])) { if($model->validate()) { // } } $this->render('index', array('model' =>…
heeeej
  • 9
  • 1
0
votes
2 answers

Create an external URL using Yii CHtml::link correctly

I am trying to create an external URL using the CHtml::link function but it always tries to create an internal link rather than an external link.. So rather than linking to google.com, it is linking to www.mysite.com/www.google.com Any ideas (ps i…
Zabs
  • 13,852
  • 45
  • 173
  • 297
0
votes
1 answer

CJuiDatePicker in CGridview as form field

I am displaying form elements in my CGridView and would like datepicker, but it complains CDataColumn and its behaviors do not have a method or closure named "widget". I have modified DATEIN using the method described in Use a widget in a…
shorif2000
  • 2,582
  • 12
  • 65
  • 137
0
votes
1 answer

Convert code format into CHtml::link Yii

How can I convert the text TbButton bootstrap into CHtml::link in Yii? below is the TbButton bootstrap code: $this->widget('bootstrap.widgets.TbButton', array( 'label'=>'Data Protection Policy - Must Read for Consultant', 'type'=>'primary',…
CnV
  • 381
  • 4
  • 20
0
votes
1 answer

How do I get the value from a checkbox in Yii?

I have a checkbox: echo CHtml::checkBox("My checkbox", true, array()); How do I read its value through Yii? I know there's activeCheckBox which will link the value to a model attribute, but I don't want to create a new model class just to read a…
moggizx
  • 476
  • 1
  • 5
  • 19
0
votes
1 answer

How create select all checkbox in Yii

I have a checkboxlist using CHtml::checkBoxList and I need a checkbox with 'Select all' to select all checkboxes when it is checked. But I don't know how to do it.
hd.
  • 17,596
  • 46
  • 115
  • 165
0
votes
1 answer

Yii radioButtonList with listData and html data attribute

I am trying to output CHtml::radioButtonList (yii 1.1.14) with each rendered element looking something like the following:
Tomeh
  • 301
  • 4
  • 14
0
votes
1 answer

Yii - CHtml; Difference between active form input and normal form input

Quite simply, what is the difference between using CHtml::textField or CHtml::activeTextField, as well as other Yii CHtml form inputs. When is it appropriate to use active vs normal form inputs.
ThorSummoner
  • 16,657
  • 15
  • 135
  • 147
0
votes
1 answer

yii CHtml::link() vs

What is the best practice of using those yii CHtml::link and such others? I'm making a button which I need to have an icon some text and responds to hover events and it must be quite wide Is there any advantage of using CHtml over regular tag…
David
  • 4,332
  • 13
  • 54
  • 93
0
votes
1 answer

uncheckValue not working with (active)checkBoxList

i have this code to generate an activeCheckBoxList:
0
votes
1 answer

Yii CHtml::link with imput inside

I have a Chtml::link like this: echo CHtml::link('DESACTIVAR',array ('/ZfIncidencias/estado', 'id'=>$data->incidencia_id),array("class"=>"desactivar")); This execute the action, but what I need is this: $id_on = $data->incidencia_id; …
Sergio_HW
  • 155
  • 3
  • 18
0
votes
0 answers

how can create login form in yii framework

i am beginner in yii . i wanna use Chtml in view and use Cactiverecord in model for authentication but is doesn't work and show me error for correct email and pass my view code is: login_form.php
reza_khalafi
  • 6,230
  • 7
  • 56
  • 82