channasmcs
(Channasmcs)
1
hi i need to add multiple selection box to my app like screenshot
i use http://www.yiiframework.com/extension/multiselect/files/multiselect.zip
i extract this in protected\extensions\multiselect folder
i need insert city id in following data table
CREATE TABLE IF NOT EXISTS tect
(
id
int(60) NOT NULL AUTO_INCREMENT,
name
int(11) NOT NULL,
PRIMARY KEY (id
)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
[color="#FF0000"] <?php $this->widget(‘ext.multiselect.JMultiSelect’,array(
'model'=>$model,
'attribute'=>'name',
'selected'=>array('0','1','3'),
'data'=>array('1'=>'Colombo','2'=>'mathara','3'=>'galle'),
// additional javascript options for the MultiSelect plugin
'options'=>array()
)); ?>[/color]
i have following Error
Property "Tect.citysFilter" is not defined.
how solve this
OR have any extension
apositivo
(Mike Ro)
2
HELLO…
a solution can be…
code js
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script>
$(document).ready(function()
{
$(function () {
$('.my_class').on('click', function () {
$(this).closest('fieldset').find(':checkbox').prop('checked', this.checked);
});
});
});
</script>
in your html
<fieldset>
<div><input type="checkbox" class="my_class"> Check all</div>
<div><input type="checkbox"> Checkbox</div>
<div><input type="checkbox"> Checkbox</div>
<div><input type="checkbox"> Checkbox</div>
</fieldset>
i need select multiple list using multiple list box how do this have code or extention
konapaz
(Konapaz)
4
Hi
I have already wrote an wiki in more complex issue!
take a look
http://www.yiiframework.com/wiki/547/visualization-tree-multi-subcategories-as-listbox-or-dropdownlist/
in practice yuo need something like that in view
$form->listBox($model, 'listCategories', array(1=>'text1',2=>'text2'...), $htmlOptions);
i need multiple select in list box i used this i drop database data but couldnt make insert id whch i select using list box please …how do this
i use this extention
http://www.yiiframew…multiselect.zip
this is my code
<div class="row">
<?php echo $form->labelEx($model,'name'); ?>
<?php $this->widget('ext.multiselect.JMultiSelect',array(
'name'=>'name',
'selected'=>(''),
'data'=>User::model()->getUseroptions(),
// additional javascript options for the MultiSelect plugin
'options'=>array()
)); ?>
this is my data table
User table
CREATE TABLE IF NOT EXISTS user
(
Id
int(50) NOT NULL AUTO_INCREMENT,
Name
varchar(250) NOT NULL,
PRIMARY KEY (Id
),
KEY Id
(Id
)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;
–
– Dumping data for table user
–
INSERT INTO user
(Id
, Name
) VALUES
(1, ‘indi’),
(2, ‘ona’),
(3, ‘koshi’),
(4, ‘channa’);
tech table
CREATE TABLE IF NOT EXISTS tect
(
id
int(60) NOT NULL AUTO_INCREMENT,
name
int(11) NOT NULL,
PRIMARY KEY (id
)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=9 ;
i need save userid in tech name filed
i need multiple select in list box i used this i drop database data but couldnt make insert id whch i select using list box please …how do this
i use this extention
http://www.yiiframew…multiselect.zip
this is my code
<div class="row">
<?php echo $form->labelEx($model,'name'); ?>
<?php $this->widget('ext.multiselect.JMultiSelect',array(
'name'=>'name',
'selected'=>(''),
'data'=>User::model()->getUseroptions(),
// additional javascript options for the MultiSelect plugin
'options'=>array()
)); ?>
this is my data table
User table
CREATE TABLE IF NOT EXISTS user
(
Id
int(50) NOT NULL AUTO_INCREMENT,
Name
varchar(250) NOT NULL,
PRIMARY KEY (Id
),
KEY Id
(Id
)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;
–
– Dumping data for table user
–
INSERT INTO user
(Id
, Name
) VALUES
(1, ‘indi’),
(2, ‘ona’),
(3, ‘koshi’),
(4, ‘channa’);
tech table
CREATE TABLE IF NOT EXISTS tect
(
id
int(60) NOT NULL AUTO_INCREMENT,
name
int(11) NOT NULL,
PRIMARY KEY (id
)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=9 ;
i need save userid in tech name filed
softark
(Softark)
7
[color="#556B2F"]/* Other 2 topics have been merged into this one. */[/color]
[color="#FF0000"]/* Please stop creating new topics that are almost the same as the existing one. */[/color]